Bug 891936 - Fix DrawWindow when used with SkiaGL r=mattwoodrow
authorJames Willcox <jwillcox@mozilla.com>
Mon, 08 Jul 2013 13:56:44 -0400
changeset 139188 2293c4eea18e45c1d8ee9e06e65e2c297acd9ed4
parent 139187 5e051e9912f81bbefc7846b5d0fcba7bfb0e6d73
child 139189 b3d8eb2515762b43bf2d2e9b42df39ab4a87f474
push idunknown
push userunknown
push dateunknown
reviewersmattwoodrow
bugs891936
milestone25.0a1
Bug 891936 - Fix DrawWindow when used with SkiaGL r=mattwoodrow
content/canvas/src/CanvasRenderingContext2D.cpp
--- a/content/canvas/src/CanvasRenderingContext2D.cpp
+++ b/content/canvas/src/CanvasRenderingContext2D.cpp
@@ -3340,17 +3340,19 @@ CanvasRenderingContext2D::DrawWindow(nsI
 
     RefPtr<SourceSurface> data =
       mTarget->CreateSourceSurfaceFromData(img->Data(),
                                            IntSize(size.width, size.height),
                                            img->Stride(),
                                            FORMAT_B8G8R8A8);
     mgfx::Rect destRect(0, 0, w, h);
     mgfx::Rect sourceRect(0, 0, sw, sh);
-    mTarget->DrawSurface(data, destRect, sourceRect);
+    mTarget->DrawSurface(data, destRect, sourceRect,
+                         DrawSurfaceOptions(mgfx::FILTER_POINT),
+                         DrawOptions(1.0f, OP_SOURCE, AA_NONE));
     mTarget->Flush();
   } else {
     mTarget->SetTransform(matrix);
   }
 
   // note that x and y are coordinates in the document that
   // we're drawing; x and y are drawn to 0,0 in current user
   // space.