From b0850c29d5223e052354a0bf9ad9595891ff6a3b Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Sat, 25 Sep 2010 23:57:56 -0700 Subject: [PATCH] b=599698; remove UpdateSurfaceClip speedtrap in canvas drawImage; r+a=shaver --- .../canvas/src/nsCanvasRenderingContext2D.cpp | 11 ------- content/canvas/test/Makefile.in | 31 ++++++++++--------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/content/canvas/src/nsCanvasRenderingContext2D.cpp b/content/canvas/src/nsCanvasRenderingContext2D.cpp index 11d7b245191..17683b0bbde 100644 --- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -3575,17 +3575,6 @@ nsCanvasRenderingContext2D::DrawImage(nsIDOMElement *imgElt, float a1, dirty = mThebes->UserToDevice(clip); } -#if 1 - // XXX cairo bug workaround; force a clip update on mThebes. - // Otherwise, a pixman clip gets left around somewhere, and pixman - // (Render) does source clipping as well -- so we end up - // compositing with an incorrect clip. This only seems to affect - // fallback cases, which happen when we have CSS scaling going on. - // This will blow away the current path, but we already blew it - // away in this function earlier. - mThebes->UpdateSurfaceClip(); -#endif - FINISH: if (NS_SUCCEEDED(rv)) rv = Redraw(dirty); diff --git a/content/canvas/test/Makefile.in b/content/canvas/test/Makefile.in index d6ba2a603d1..b9e3b7aa228 100644 --- a/content/canvas/test/Makefile.in +++ b/content/canvas/test/Makefile.in @@ -68,10 +68,14 @@ _TEST_FILES_0 = \ image_green-redirect^headers^ \ test_drawImageIncomplete.html \ test_canvas_font_setter.html \ - test_2d.composite.uncovered.image.source-in.html \ - test_2d.composite.uncovered.image.destination-in.html \ - test_2d.composite.uncovered.image.source-out.html \ - test_2d.composite.uncovered.image.destination-atop.html \ + test_2d.composite.canvas.destination-atop.html \ + test_2d.composite.canvas.destination-in.html \ + test_2d.composite.canvas.source-in.html \ + test_2d.composite.canvas.source-out.html \ + test_2d.composite.image.destination-atop.html \ + test_2d.composite.image.destination-in.html \ + test_2d.composite.image.source-in.html \ + test_2d.composite.image.source-out.html \ test_mozGetAsFile.html \ $(NULL) @@ -89,17 +93,14 @@ _TEST_FILES_0 = \ # test_2d.composite.clip.lighter.html \ # -# Temporarily disabled tests; unbounded operators changed behaviour, need to reevaluate tests -# -# test_2d.composite.canvas.destination-atop.html \ -# test_2d.composite.canvas.destination-in.html \ -# test_2d.composite.canvas.source-in.html \ -# test_2d.composite.canvas.source-out.html \ -# test_2d.composite.image.destination-atop.html \ -# test_2d.composite.image.destination-in.html \ -# test_2d.composite.image.source-in.html \ -# test_2d.composite.image.source-out.html \ -# +# Temporarily disabled tests; unbounded operators changed behaviour, need to reevaluate tests. +# At one point we were passing these accidentally, because the UpdateSurfaceClip at the end +# of drawImage happened to clear the entire canvas with some operators, which is what these +# tests were checking. +# test_2d.composite.uncovered.image.source-in.html \ +# test_2d.composite.uncovered.image.destination-in.html \ +# test_2d.composite.uncovered.image.source-out.html \ +# test_2d.composite.uncovered.image.destination-atop.html \ # Tests that fail on Mac (possibly because spec is underdefined?). Bug 407105 ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)