Backout b43f4d9f38da (bug 725925) for reftest failures
authorEd Morley <bmo@edmorley.co.uk>
Fri, 10 Feb 2012 23:23:16 +0000
changeset 86640 80910c61fba9ddede17045274ce9917b218a43c4
parent 86639 b43f4d9f38daa89efbea5a3997ef4405f29a3371
child 86641 d71dab82fff4325584406ae0ffac3ba89a73f13e
child 86645 308b3ced990bd3bd579d743d3b90d50f70f0f7ef
push idunknown
push userunknown
push dateunknown
bugs725925
milestone13.0a1
backs outb43f4d9f38daa89efbea5a3997ef4405f29a3371
Backout b43f4d9f38da (bug 725925) for reftest failures
gfx/layers/basic/BasicLayers.cpp
widget/xpwidgets/PuppetWidget.cpp
--- a/gfx/layers/basic/BasicLayers.cpp
+++ b/gfx/layers/basic/BasicLayers.cpp
@@ -758,19 +758,17 @@ BasicThebesLayer::PaintThebes(gfxContext
       NS_ASSERTION(state.mRegionToDraw.IsEmpty(),
                    "If we need to draw, we should have a context");
     }
   }
 
   if (BasicManager()->IsTransactionIncomplete())
     return;
 
-  gfxRect clipExtents;
-  clipExtents = aContext->GetClipExtents();
-  if (!IsHidden() && clipExtents.IsEmpty()) {
+  if (!IsHidden()) {
     AutoSetOperator setOperator(aContext, GetOperator());
     mBuffer.DrawTo(this, aContext, opacity);
   }
 
   for (PRUint32 i = 0; i < readbackUpdates.Length(); ++i) {
     ReadbackProcessor::Update& update = readbackUpdates[i];
     nsIntPoint offset = update.mLayer->GetBackgroundLayerOffset();
     nsRefPtr<gfxContext> ctx =
@@ -1943,32 +1941,26 @@ BasicLayerManager::PaintLayer(gfxContext
   if (needsGroup) {
     bool blitComplete = false;
     if (is2D) {
       PopGroupToSourceWithCachedSurface(aTarget, groupTarget);
     } else {
       NS_ABORT_IF_FALSE(untransformedSurface, 
                         "We should always allocate an untransformed surface with 3d transforms!");
 
-      // Temporary fast fix for bug 725886
-      // Revert these changes when 725886 is ready
-      gfxRect clipExtents;
-      clipExtents = aTarget->GetClipExtents();
-      if (!clipExtents.IsEmpty()) {
-        gfxPoint offset;
-        bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete ||
-                          aLayer->GetEffectiveOpacity() != 1.0f;
-        nsRefPtr<gfxASurface> result =
-          Transform3D(untransformedSurface, aTarget, bounds,
-                      effectiveTransform, offset, dontBlit);
-
-        blitComplete = !result;
-        if (result) {
-          aTarget->SetSource(result, offset);
-        }
+      gfxPoint offset;
+      bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete || 
+                        aLayer->GetEffectiveOpacity() != 1.0f;
+      nsRefPtr<gfxASurface> result = 
+        Transform3D(untransformedSurface, aTarget, bounds,
+                    effectiveTransform, offset, dontBlit);
+
+      blitComplete = !result;
+      if (result) {
+        aTarget->SetSource(result, offset);
       }
     }
     // If we're doing our own double-buffering, we need to avoid drawing
     // the results of an incomplete transaction to the destination surface ---
     // that could cause flicker. Double-buffering is implemented using a
     // temporary surface for one or more container layers, so we need to stop
     // those temporary surfaces from being composited to aTarget.
     // ApplyDoubleBuffering guarantees that this container layer can't
--- a/widget/xpwidgets/PuppetWidget.cpp
+++ b/widget/xpwidgets/PuppetWidget.cpp
@@ -525,18 +525,16 @@ PuppetWidget::DispatchPaintEvent()
     debug_DumpPaintEvent(stderr, this, &event,
                          nsCAutoString("PuppetWidget"), nsnull);
 #endif
 
     if (LayerManager::LAYERS_D3D10 == mLayerManager->GetBackendType()) {
       DispatchEvent(&event, status);
     } else {
       nsRefPtr<gfxContext> ctx = new gfxContext(mSurface);
-      ctx->Rectangle(gfxRect(0,0,0,0));
-      ctx->Clip();
       AutoLayerManagerSetup setupLayerManager(this, ctx,
                                               BasicLayerManager::BUFFER_NONE);
       DispatchEvent(&event, status);  
     }
   }
 
   nsPaintEvent didPaintEvent(true, NS_DID_PAINT, this);
   DispatchEvent(&didPaintEvent, status);