summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2019-04-26 14:45:26 -0700
committer Chavi Weingarten <chaviw@google.com> 2019-04-29 23:27:17 +0000
commit74d90ad55aadf64f12499d8cc27807b781c8ddeb (patch)
tree6b470655ed0b5933df8644746d02ccc6a1976ea9 /libs/gui/ConsumerBase.cpp
parent89655c0603b01e0bf778ce43faa4ecbf2f279d44 (diff)
Ensure currentState is copied to drawingState for offscreen layers
When a layer is re-parented to null, it becomes offscreen. This means it can't be reached when traversing layers. The layer can still be around in memory and modified since the client can still access it. If the layer makes changes to other layers it references (children or relative), that info will never get copied from currentState to drawingState. This could possibly cause leaks since the offscreen layer will continue to hold a reference to another layer even if the layer requested to be re-parented. This change stores a raw reference to the offscreen layers so their states can get copied from current to drawing, ensuring that any references are updated properly. Test: Steps from bug does not create buffer leak Test: go/wm-smoke no buffer leak Fixes: 131265073 Fixes: 126185092 Change-Id: I3b32350cfdb7e7cbd75eab107d986877c6d6f6ba
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions