Bug 907463. Backout OP_SOURCE optimisation from bug 907926. r=mattwoodrow
authorNicholas Cameron <ncameron@mozilla.com>
Wed, 18 Sep 2013 15:39:34 +1200
changeset 147677 0ae388d62a87e77586eedd6713e8062a79dca620
parent 147676 10065efeed2fc3ab87f73d61e31dc1e881bea13f
child 147678 4b54782ad3ffeff188d098282776a509a40eb552
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmattwoodrow
bugs907463, 907926
milestone27.0a1
Bug 907463. Backout OP_SOURCE optimisation from bug 907926. r=mattwoodrow
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -522,17 +522,20 @@ ContentClientDoubleBuffered::UpdateDesti
 
   bool isClippingCheap = IsClippingCheap(destCtx, aUpdateRegion);
   if (isClippingCheap) {
     gfxUtils::ClipToRegion(destCtx, aUpdateRegion);
   }
 
   if (SupportsAzureContent()) {
     MOZ_ASSERT(!destCtx->IsCairo());
-    aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_BLACK, 1.0, OP_SOURCE);
+    if (destCtx->GetDrawTarget()->GetFormat() == FORMAT_B8G8R8A8) {		
+      destCtx->GetDrawTarget()->ClearRect(Rect(0, 0, mFrontBufferRect.width, mFrontBufferRect.height));		
+    }		
+    aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_BLACK);
   } else {
     aSource.DrawBufferWithRotation(destCtx, BUFFER_BLACK);
   }
 
   if (aSource.HaveBufferOnWhite()) {
     MOZ_ASSERT(HaveBufferOnWhite());
     nsRefPtr<gfxContext> destCtx =
       GetContextForQuadrantUpdate(aUpdateRegion.GetBounds(), BUFFER_WHITE);
@@ -540,17 +543,20 @@ ContentClientDoubleBuffered::UpdateDesti
 
     bool isClippingCheap = IsClippingCheap(destCtx, aUpdateRegion);
     if (isClippingCheap) {
       gfxUtils::ClipToRegion(destCtx, aUpdateRegion);
     }
 
     if (SupportsAzureContent()) {
       MOZ_ASSERT(!destCtx->IsCairo());
-      aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_WHITE, 1.0, OP_SOURCE);
+      if (destCtx->GetDrawTarget()->GetFormat() == FORMAT_B8G8R8A8) {		
+        destCtx->GetDrawTarget()->ClearRect(Rect(0, 0, mFrontBufferRect.width, mFrontBufferRect.height));		
+      }		
+      aSource.DrawBufferWithRotation(destCtx->GetDrawTarget(), BUFFER_WHITE);
     } else {
       aSource.DrawBufferWithRotation(destCtx, BUFFER_WHITE);
     }
   }
 }
 
 ContentClientSingleBuffered::~ContentClientSingleBuffered()
 {