summaryrefslogtreecommitdiff
path: root/libs/gui/DisplayLuts.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2021-05-05 18:44:58 -0700
committer Alec Mouri <alecmouri@google.com> 2021-05-12 13:22:39 -0700
commitd1bf1b529bcbb2ccd6d7b5d6dd94d543e79b7e35 (patch)
tree8aaa3cb0d69d03393f4c6a151efef1f5e4249e6a /libs/gui/DisplayLuts.cpp
parent023c188fbe96aed8db11e572f21840d8e90ca7f2 (diff)
Resolve subtle but severe flickering in layer caching
Inconsistencies in composer state was arising from a layer exiting layer caching. Resolve this by: * If a layer previously had an override buffer, but now does not for the current frame, set the surface damage region to be the entire buffer. * If a layer is currently being skipped, then don't update the composition type, since the validated composition type is no longer accurate for representing the current composition type of the device. * If a layer was previously skipped, then update in HWC the new composition type every time. The inconsistencies have arised from the layer caching feature because composer implementations cache the most recent requested composition type for each layer, but SurfaceFlinger caches the most recent {requested, validated} type for each layer, whichever SurfaceFlinger sees last. So if we forced client composition, then untoggled client composition, and if hwc was device compositing the layer during validate instead of client compositing because hwc ignored the layer, then SF caches DEVICE composition, but hwc caches CLIENT composition internally. SF then doesn't update the layer's composition type because it cached DEVICE composition, but hwc never displays the layer because hwc cached CLIENT composition, and typical hwc implementations never attempt to read from client composited layers. Bug: 187193705 Test: libcompositionengine_test Test: enable layer caching and repeatedly enable and disable client composition when pip is playing Change-Id: I9b6890bcf3f0612e8f99f5f1642015e53d59f862
Diffstat (limited to 'libs/gui/DisplayLuts.cpp')
0 files changed, 0 insertions, 0 deletions