Allow changing composition from DISPLAY_DECORATION to DEVICE
After some discussion, we've decided to always set the ScreenDecorations
to DISPLAY_DECORATION. HWC can decide, based on the format, whether to
truly treat it as DISPLAY_DECORATION, or to change to DEVICE
composition.
Previously we were concerned that SurfaceFlinger couldn't use this
information (if we provided it). Looking to the future, it's possible SF
may use this information to help make a better plan for the next frame.
Bug: 193170859
Test: manual
Change-Id: I1da3199bacf5877e88876249c60c0a33fcd44c1e
diff --git a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
index 94ad6c3..545e2a2 100644
--- a/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/OutputLayer.cpp
@@ -685,12 +685,12 @@
case Composition::DEVICE:
case Composition::SOLID_COLOR:
- case Composition::DISPLAY_DECORATION:
result = (to == Composition::CLIENT);
break;
case Composition::CURSOR:
case Composition::SIDEBAND:
+ case Composition::DISPLAY_DECORATION:
result = (to == Composition::CLIENT || to == Composition::DEVICE);
break;
}