diff options
author | Chia-I Wu <olv@google.com> | 2017-08-15 11:18:17 -0700 |
---|---|---|
committer | Chia-I Wu <olv@google.com> | 2017-08-15 14:20:49 -0700 |
commit | c665702cea06c5c42360b7f66fed1693127e6680 (patch) | |
tree | 492521de4c7a73aeb48a08c7d670bed9e7bececa /opengl/tests/gl_basic/gl_basic.cpp | |
parent | d2bc3ac8c4d7e71975a8c99762b63307a5e6e449 (diff) |
surfaceflinger: fix z-relative layer destruction
Layer::commitTransaction is called before Layer::onRemoved. The
removal of a layer from another layer's zOrderRelatives is not
reflected in Layer::mDrawingState until Layer::commitTransaction is
called again. As a result, we may draw a removed layer, which is
not supposed to own any HWC or GL resource.
Add Layer::onRemovedFromCurrentState that is called when a layer is
removed from mCurrentState to mLayersPendingRemoval. Move
zOrderRelative* updates from onRemoved to the new
onRemovedFromCurrentState, and set eTraversalNeeded as needed.
Also fix Layer::~Layer to restore the old behavior and destroy all
stale HWC layers just in case.
Bug: 64572777
Test: manual and AUPT
Change-Id: I546c5b4b7ecac0937fead655733402fae664331c
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions