Bug 995661 patch 2 - Use OP_OVER rather than OP_SOURCE to handle canvas drawWindow calls that don't cover the canvas or (I believe) that contain transparency. r=mattwoodrow
authorL. David Baron <dbaron@dbaron.org>
Mon, 14 Apr 2014 11:12:00 -0700
changeset 196884 2e0abf6eeec34795ed5ff416ca4c758869a984be
parent 196883 febd5ad98adb549c7ffdea955f7a243dee3def2a
child 196885 33bfd3ceee1f57e75614971b51963f467d2cf2b2
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs995661
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 995661 patch 2 - Use OP_OVER rather than OP_SOURCE to handle canvas drawWindow calls that don't cover the canvas or (I believe) that contain transparency. r=mattwoodrow This is needed to allow us to return to using partial-canvas invalidates in the reftest harness, though only for the platforms that go through this codepath.
content/canvas/src/CanvasRenderingContext2D.cpp
--- a/content/canvas/src/CanvasRenderingContext2D.cpp
+++ b/content/canvas/src/CanvasRenderingContext2D.cpp
@@ -3669,17 +3669,18 @@ CanvasRenderingContext2D::DrawWindow(nsG
       error.Throw(NS_ERROR_FAILURE);
       return;
     }
 
     mgfx::Rect destRect(0, 0, w, h);
     mgfx::Rect sourceRect(0, 0, sw, sh);
     mTarget->DrawSurface(source, destRect, sourceRect,
                          DrawSurfaceOptions(mgfx::Filter::POINT),
-                         DrawOptions(1.0f, CompositionOp::OP_SOURCE, AntialiasMode::NONE));
+                         DrawOptions(1.0f, CompositionOp::OP_OVER,
+                                     AntialiasMode::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.