Backed out changeset 6150269410b2 (bug 921212) for bustage on a CLOSED TREE.

This commit is contained in:
Ryan VanderMeulen
2013-10-18 10:21:38 -04:00
parent aaa0464824
commit 92b01d4f75
11 changed files with 18 additions and 323 deletions

View File

@@ -479,13 +479,21 @@ ContentClientDoubleBuffered::SyncFrontBufferToBackBuffer()
nsIntRegion updateRegion = mFrontUpdatedRegion;
int32_t xBoundary = mBufferRect.XMost() - mBufferRotation.x;
int32_t yBoundary = mBufferRect.YMost() - mBufferRotation.y;
// Figure out whether the area we want to copy wraps the edges of our buffer.
bool needFullCopy = (xBoundary < updateRegion.GetBounds().XMost() &&
xBoundary > updateRegion.GetBounds().x) ||
(yBoundary < updateRegion.GetBounds().YMost() &&
yBoundary > updateRegion.GetBounds().y);
// This is a tricky trade off, we're going to get stuff out of our
// frontbuffer now, but the next PaintThebes might throw it all (or mostly)
// away if the visible region has changed. This is why in reality we want
// this code integrated with PaintThebes to always do the optimal thing.
if (mDidSelfCopy) {
mDidSelfCopy = false;
if (needFullCopy) {
// We can't easily draw our front buffer into us, since we're going to be
// copying stuff around anyway it's easiest if we just move our situation
// to non-rotated while we're at it. If this situation occurs we'll have