am 48be3232: Merge "make sure to update the "current state" when we "fake" the transaction" into jb-mr2-dev

* commit '48be323236f9fc41620a17e182eea800351812c5':
  make sure to update the "current state" when we "fake" the transaction
This commit is contained in:
Mathias Agopian 2013-04-12 17:32:30 -07:00 committed by Android Git Automerger
commit d7932a62d0

View File

@ -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;
}