diff options
author | Mathias Agopian <mathias@google.com> | 2013-04-12 16:58:11 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-04-12 16:58:11 -0700 |
commit | 6c67f0fe457f758fc875e1178d8fd5258fd8f6df (patch) | |
tree | d63dec0297294562a137460c501698f0c4568412 /services | |
parent | 453cfe0bfe06f3cbd87c8c42fa641756ab466b06 (diff) | |
download | frameworks_native-6c67f0fe457f758fc875e1178d8fd5258fd8f6df.zip frameworks_native-6c67f0fe457f758fc875e1178d8fd5258fd8f6df.tar.gz frameworks_native-6c67f0fe457f758fc875e1178d8fd5258fd8f6df.tar.bz2 |
make sure to update the "current state" when we "fake" the transaction
this mimics the code we used for the size. basically we need to
also update the "current state" because it gets copied to the
"drawing state" when a transaction occurs, and it would
"undo" our change.
Bug: 8511430
Bug: 8581533
Change-Id: I08c02abbf21b7f168f7124cd14ee717d7d3d502c
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 2302367..4779804 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1067,6 +1067,16 @@ Region Layer::latchBuffer(bool& recomputeVisibleRegions) if (!front.activeTransparentRegion.isTriviallyEqual( front.requestedTransparentRegion)) { front.activeTransparentRegion = front.requestedTransparentRegion; + + // We also need to update the current state so that + // we don't end-up overwriting the drawing state with + // this stale current state during the next transaction + // + // NOTE: We don't need to hold the transaction lock here + // because State::active is only accessed from this thread. + current.activeTransparentRegion = front.activeTransparentRegion; + + // recompute visible region recomputeVisibleRegions = true; } |