summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2019-11-12 12:46:02 -0800
committer Alec Mouri <alecmouri@google.com> 2019-11-14 18:02:29 -0800
commitf9a2a2ce2e5b4117f835b1e9f95cf6870ffc451b (patch)
treebd46739ef49033e745ad93a82d272fe13b74eb78 /vulkan/libvulkan/api.cpp
parent0be01b4efc148049015e3df39bee7f1ec6f20ba6 (diff)
[SurfaceFlinger] Don't persist buffers to HWC when powered off.
This fixes an extremely rare crash, where stale buffer handles were parceled over to HWC. The cause was that HWC's command queue is not flushed while the display is powered off, so buffers handles may become stale while they are sitting in the command queue. If a layer's buffer goes out of scope in SurfaceFlinger, e.g. an app continues renderng while the display is powered down, SurfaceFlinger latches the new buffers, and consequently releases old buffers, then those buffers will be deallocated while still sending the handles over to HWC the next time a frame needs to be presented. The fix prevents buffers from being queued while the display power mode is OFF, so that buffer handles should never become stale while in the command queue. Bug: 141290044 Test: Enabling HWSAN: covering the phone during Hangouts video calling with speaker-phone disabled to trigger display power down. Test: libcompositionengine_test Change-Id: I2592fecbbc17cf1ed70c348df8e53e9c59afb073
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions