Bug 772726. Part 2: When BasicLayers is compositing directly to an Azure DrawTarget, Transform3D should handle the destination not having a CurrentSurface. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 18 Jul 2012 01:02:07 -0400
changeset 99629 a3ee29cb995c46f2c9f64db2c53767aa1bbbed85
parent 99628 58525c0d69f24a7b1bfd59f97efb33c9466bab05
child 99630 c59466c2042b7923cb0a25610992587ef2d97dd7
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmattwoodrow
bugs772726
milestone17.0a1
Bug 772726. Part 2: When BasicLayers is compositing directly to an Azure DrawTarget, Transform3D should handle the destination not having a CurrentSurface. r=mattwoodrow
gfx/layers/basic/BasicLayerManager.cpp
--- a/gfx/layers/basic/BasicLayerManager.cpp
+++ b/gfx/layers/basic/BasicLayerManager.cpp
@@ -612,18 +612,17 @@ Transform3D(gfxASurface* aSource, gfxCon
 
   // Intersect the transformed layer with the destination rectangle.
   // This is in device space since we have an identity transform set on aTarget.
   gfxRect destRect = aDest->GetClipExtents();
   destRect.IntersectRect(destRect, offsetRect);
 
   // Create a surface the size of the transformed object.
   nsRefPtr<gfxASurface> dest = aDest->CurrentSurface();
-  nsRefPtr<gfxImageSurface> destImage = dest->GetAsImageSurface();
-  destImage = nsnull;
+  nsRefPtr<gfxImageSurface> destImage;
   gfxPoint offset;
   bool blitComplete;
   if (!destImage || aDontBlit || !aDest->ClipContainsRect(destRect)) {
     destImage = new gfxImageSurface(gfxIntSize(destRect.width, destRect.height),
                                     gfxASurface::ImageFormatARGB32);
     offset = destRect.TopLeft();
     blitComplete = false;
   } else {