Skip to content

Commit 9abda97

Browse files
cairno-googleAndroid (Google) Code Review
authored andcommitted
Revert "Don't force client composition when rounded corners are cached"
This reverts commit c7e3e0c. Reason for revert: b/398131325 Change-Id: I5870678cb8a69457e0a4a197a8cb67128e104399
1 parent c7e3e0c commit 9abda97

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

services/surfaceflinger/CompositionEngine/include/compositionengine/impl/OutputLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class OutputLayer : public virtual compositionengine::OutputLayer {
104104
void detectDisallowedCompositionTypeChange(
105105
aidl::android::hardware::graphics::composer3::Composition from,
106106
aidl::android::hardware::graphics::composer3::Composition to) const;
107-
bool isClientCompositionForced(bool isPeekingThrough, bool isCached) const;
107+
bool isClientCompositionForced(bool isPeekingThrough) const;
108108
void updateLuts(const LayerFECompositionState&,
109109
const std::optional<std::vector<std::optional<LutProperties>>>& properties);
110110
};

services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,7 @@ void OutputLayer::writeCompositionTypeToHWC(HWC2::Layer* hwcLayer,
865865
bool isPeekingThrough, bool skipLayer) {
866866
auto& outputDependentState = editState();
867867

868-
bool isCached = !skipLayer && outputDependentState.overrideInfo.buffer;
869-
if (isClientCompositionForced(isPeekingThrough, isCached)) {
868+
if (isClientCompositionForced(isPeekingThrough)) {
870869
// If we are forcing client composition, we need to tell the HWC
871870
requestedCompositionType = Composition::CLIENT;
872871
}
@@ -956,12 +955,9 @@ void OutputLayer::detectDisallowedCompositionTypeChange(Composition from, Compos
956955
}
957956
}
958957

959-
bool OutputLayer::isClientCompositionForced(bool isPeekingThrough, bool isCached) const {
960-
// If this layer was flattened into a CachedSet then it is not necessary for
961-
// the GPU to compose it.
962-
bool requiresClientDrawnRoundedCorners = !isCached && getLayerFE().hasRoundedCorners();
958+
bool OutputLayer::isClientCompositionForced(bool isPeekingThrough) const {
963959
return getState().forceClientComposition ||
964-
(!isPeekingThrough && requiresClientDrawnRoundedCorners);
960+
(!isPeekingThrough && getLayerFE().hasRoundedCorners());
965961
}
966962

967963
void OutputLayer::applyDeviceCompositionTypeChange(Composition compositionType) {

services/surfaceflinger/FrontEnd/LayerSnapshot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,15 +544,15 @@ char LayerSnapshot::classifyCompositionForDebug(
544544
case Composition::INVALID:
545545
return 'i';
546546
case Composition::SOLID_COLOR:
547-
return 'e';
547+
return 'c';
548548
case Composition::CURSOR:
549549
return 'u';
550550
case Composition::SIDEBAND:
551551
return 'd';
552552
case Composition::DISPLAY_DECORATION:
553553
return 'a';
554554
case Composition::REFRESH_RATE_INDICATOR:
555-
return 'f';
555+
return 'r';
556556
case Composition::CLIENT:
557557
case Composition::DEVICE:
558558
break;

0 commit comments

Comments
 (0)