summaryrefslogtreecommitdiff
path: root/opengl/libagl/BufferObjectManager.cpp
diff options
context:
space:
mode:
author Marissa Wall <marissaw@google.com> 2019-07-10 15:32:50 -0700
committer android-build-team Robot <android-build-team-robot@google.com> 2019-07-12 00:12:37 +0000
commit9cacdacbb96ce8a67633873a7f0a844465ac5d76 (patch)
treeefa047502af5e5fa08fa7cdfbde52dc557c2f4ba /opengl/libagl/BufferObjectManager.cpp
parent277e714cfb58fccc851601869ce4c06c0afeacaa (diff)
blast: fix leak on BufferStateLayer death
SurfaceFlinger can occasionally leak graphic buffers. The leak happens when: 1) a transaction comes in and is placed in a queue 2) Chrome crashes 3) the parent layer is cleaned up 4) the child layer is told to release its buffer because it is no longer on screen 5) the transaction is applied with sets a callback handle on the layer which has a sp<> to the layer To fix this, the callback handle should not have a sp<> to layer. It is safe for the callback handle can have wp<> to the layer. The client side has a sp<> so during normal operation, SurfaceFlinger can promote the wp<>. The only time the promote will fail is if the client side is dead. If the client side is dead, there is no one to send a callback to so it doesn't matter if the promote fails. Bug: 135951943 Test: https://buganizer.corp.google.com/issues/135951943#comment34 Change-Id: I756ace14c90b03a6499a3187d235b42d91cdd05a (cherry picked from commit 0e24a8385a63be6a799da902e1d5ffcbb7519c2a)
Diffstat (limited to 'opengl/libagl/BufferObjectManager.cpp')
0 files changed, 0 insertions, 0 deletions