Skip to content

Commit fabe226

Browse files
cairno-googleAndroid (Google) Code Review
authored andcommitted
Merge "Revert "Don't force client composition when rounded corners are cached"" into main
2 parents 851a6d2 + 9abda97 commit fabe226

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
@@ -876,8 +876,7 @@ void OutputLayer::writeCompositionTypeToHWC(HWC2::Layer* hwcLayer,
876876
bool isPeekingThrough, bool skipLayer) {
877877
auto& outputDependentState = editState();
878878

879-
bool isCached = !skipLayer && outputDependentState.overrideInfo.buffer;
880-
if (isClientCompositionForced(isPeekingThrough, isCached)) {
879+
if (isClientCompositionForced(isPeekingThrough)) {
881880
// If we are forcing client composition, we need to tell the HWC
882881
requestedCompositionType = Composition::CLIENT;
883882
}
@@ -967,12 +966,9 @@ void OutputLayer::detectDisallowedCompositionTypeChange(Composition from, Compos
967966
}
968967
}
969968

970-
bool OutputLayer::isClientCompositionForced(bool isPeekingThrough, bool isCached) const {
971-
// If this layer was flattened into a CachedSet then it is not necessary for
972-
// the GPU to compose it.
973-
bool requiresClientDrawnRoundedCorners = !isCached && getLayerFE().hasRoundedCorners();
969+
bool OutputLayer::isClientCompositionForced(bool isPeekingThrough) const {
974970
return getState().forceClientComposition ||
975-
(!isPeekingThrough && requiresClientDrawnRoundedCorners);
971+
(!isPeekingThrough && getLayerFE().hasRoundedCorners());
976972
}
977973

978974
void OutputLayer::applyDeviceCompositionTypeChange(Composition compositionType) {

services/surfaceflinger/FrontEnd/LayerSnapshot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,15 +540,15 @@ char LayerSnapshot::classifyCompositionForDebug(
540540
case Composition::INVALID:
541541
return 'i';
542542
case Composition::SOLID_COLOR:
543-
return 'e';
543+
return 'c';
544544
case Composition::CURSOR:
545545
return 'u';
546546
case Composition::SIDEBAND:
547547
return 'd';
548548
case Composition::DISPLAY_DECORATION:
549549
return 'a';
550550
case Composition::REFRESH_RATE_INDICATOR:
551-
return 'f';
551+
return 'r';
552552
case Composition::CLIENT:
553553
case Composition::DEVICE:
554554
break;

0 commit comments

Comments
 (0)