diff options
author | Mathias Agopian <mathias@google.com> | 2013-04-13 00:27:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-13 00:27:32 +0000 |
commit | 48be323236f9fc41620a17e182eea800351812c5 (patch) | |
tree | cb7a2b88d50023d48e45c0b3f61b5612733c9650 /services | |
parent | 2ea0c67da6770a840d871a69c61bb52d73dadf2b (diff) | |
parent | 6c67f0fe457f758fc875e1178d8fd5258fd8f6df (diff) | |
download | frameworks_native-48be323236f9fc41620a17e182eea800351812c5.zip frameworks_native-48be323236f9fc41620a17e182eea800351812c5.tar.gz frameworks_native-48be323236f9fc41620a17e182eea800351812c5.tar.bz2 |
Merge "make sure to update the "current state" when we "fake" the transaction" into jb-mr2-dev
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; } |