summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cairn Overturf <cairno@google.com> 2025-03-06 09:54:13 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-06 09:54:13 -0800
commit9abda97eac39920917036996f204ba3aa5ed1294 (patch)
treedcf0cc6733e0740c563331ad29707b773d5aa004
parentc7e3e0c1d284f76155020d09b1a9ac65ea18f1b3 (diff)
Revert "Don't force client composition when rounded corners are cached"
This reverts commit c7e3e0c1d284f76155020d09b1a9ac65ea18f1b3. Reason for revert: b/398131325 Change-Id: I5870678cb8a69457e0a4a197a8cb67128e104399
-rw-r--r--services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h2
-rw-r--r--services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp10
-rw-r--r--services/surfaceflinger/FrontEnd/LayerSnapshot.cpp4
3 files changed, 6 insertions, 10 deletions
diff --git a/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h b/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h
index a1434f21cc..0063eee0e1 100644
--- a/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h
+++ b/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h
@@ -104,7 +104,7 @@ private:
void detectDisallowedCompositionTypeChange(
aidl::android::hardware::graphics::composer3::Composition from,
aidl::android::hardware::graphics::composer3::Composition to) const;
- bool isClientCompositionForced(bool isPeekingThrough, bool isCached) const;
+ bool isClientCompositionForced(bool isPeekingThrough) const;
void updateLuts(const LayerFECompositionState&,
const std::optional<std::vector<std::optional<LutProperties>>>& properties);
};
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index d89b52d632..9d67122f2e 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -865,8 +865,7 @@ void OutputLayer::writeCompositionTypeToHWC(HWC2::Layer* hwcLayer,
bool isPeekingThrough, bool skipLayer) {
auto& outputDependentState = editState();
- bool isCached = !skipLayer && outputDependentState.overrideInfo.buffer;
- if (isClientCompositionForced(isPeekingThrough, isCached)) {
+ if (isClientCompositionForced(isPeekingThrough)) {
// If we are forcing client composition, we need to tell the HWC
requestedCompositionType = Composition::CLIENT;
}
@@ -956,12 +955,9 @@ void OutputLayer::detectDisallowedCompositionTypeChange(Composition from, Compos
}
}
-bool OutputLayer::isClientCompositionForced(bool isPeekingThrough, bool isCached) const {
- // If this layer was flattened into a CachedSet then it is not necessary for
- // the GPU to compose it.
- bool requiresClientDrawnRoundedCorners = !isCached && getLayerFE().hasRoundedCorners();
+bool OutputLayer::isClientCompositionForced(bool isPeekingThrough) const {
return getState().forceClientComposition ||
- (!isPeekingThrough && requiresClientDrawnRoundedCorners);
+ (!isPeekingThrough && getLayerFE().hasRoundedCorners());
}
void OutputLayer::applyDeviceCompositionTypeChange(Composition compositionType) {
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
index 1514340e50..839bd79dac 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
@@ -544,7 +544,7 @@ char LayerSnapshot::classifyCompositionForDebug(
case Composition::INVALID:
return 'i';
case Composition::SOLID_COLOR:
- return 'e';
+ return 'c';
case Composition::CURSOR:
return 'u';
case Composition::SIDEBAND:
@@ -552,7 +552,7 @@ char LayerSnapshot::classifyCompositionForDebug(
case Composition::DISPLAY_DECORATION:
return 'a';
case Composition::REFRESH_RATE_INDICATOR:
- return 'f';
+ return 'r';
case Composition::CLIENT:
case Composition::DEVICE:
break;