Bug 776793: Properly create an opaque surface when copying in the background. r=joedrew
authorBas Schouten <bschouten@mozilla.com>
Tue, 02 Oct 2012 19:18:56 +0200
changeset 109021 b36ff62f95b3acb9dee48a8dcb0bea6d120d0d5f
parent 109020 c0ef7fe877d2b76c482fa838b281570357aa5b2c
child 109022 bca6d709dba2a81766e628809e28454fc8ccd61c
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersjoedrew
bugs776793
milestone18.0a1
Bug 776793: Properly create an opaque surface when copying in the background. r=joedrew
gfx/thebes/gfxContext.cpp
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -1541,17 +1541,17 @@ gfxContext::PushGroupAndCopyBackground(g
     if (mDT->GetFormat() != FORMAT_B8G8R8X8) {
       gfxRect clipRect = GetRoundOutDeviceClipExtents(this);
       clipExtents = IntRect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
     }
     if (mDT->GetFormat() == FORMAT_B8G8R8X8 ||
         mDT->GetOpaqueRect().Contains(clipExtents)) {
       DrawTarget *oldDT = mDT;
       RefPtr<SourceSurface> source = mDT->Snapshot();
-      PushGroup(content);
+      PushGroup(gfxASurface::CONTENT_COLOR);
       Rect surfRect(0, 0, Float(mDT->GetSize().width), Float(mDT->GetSize().height));
       Matrix oldTransform = mDT->GetTransform();
       mDT->SetTransform(Matrix());
       mDT->DrawSurface(source, surfRect, surfRect); 
       mDT->SetTransform(oldTransform);
       mDT->SetOpaqueRect(oldDT->GetOpaqueRect());
       return;
     }