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
This commit is contained in:
Mathias Agopian 2013-04-12 16:58:11 -07:00
parent 453cfe0bfe
commit 6c67f0fe45

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