summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2019-09-30 17:27:13 -0700
committer Alec Mouri <alecmouri@google.com> 2020-04-16 11:34:38 -0700
commitd9c717511c46eefa78821a7e326bffde4f02076b (patch)
tree5c55d06b523dd166e4d7375d4c9a0e91bfe8a45b /libs/gui/SurfaceComposerClient.cpp
parent750410b93dbae82561770d731ffc4301a6466673 (diff)
[RenderEngine] Rebind output texture when unbinding framebuffer
Without this patch, once drawLayers() completes we'd hold onto the backing image data longer than intended since it's bound to sibling texture. This would cause screenshot buffers to be live for longer than intended. This patch rebinds the framebuffer's output texture to a dummy buffer so that we can free memory sooner. We perform this rebind on the main thread in SurfaceFlinger::postComposition, to minimize the amount of expected time we steal for composition due to this cleanup. We also only do this cleanup if the most recent draw fence had fired, since the driver will need to wait for GPU work to complete before freeing resources which can kill performance. Bug: 140158384 Test: screencap and check dumpsys Test: systrace when during screen rotation Test: systrace when toggling GPU composition on and off Test: librenderengine_test, libcompositionengine_test Change-Id: I0aa39e62f03a09f6db000c2abdbb1d0711127fc3
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
0 files changed, 0 insertions, 0 deletions