Bug 1068230 - Don't use the gfxContext transform in intermediate surface, r=seth
authorMichael Wu <mwu@mozilla.com>
Thu, 18 Sep 2014 15:53:02 -0400
changeset 206115 9a4f85820092e7186bb8b3c7d901522ca8c84977
parent 206114 446fb70a00f47f2fcd2d5d61bf07c68f0c2f0dd5
child 206116 245051c6a7ede4ddedb24d6a58b25bf4f8132026
push id27513
push usercbook@mozilla.com
push dateFri, 19 Sep 2014 12:15:35 +0000
treeherdermozilla-central@dadafedc0760 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1068230
milestone35.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 1068230 - Don't use the gfxContext transform in intermediate surface, r=seth
image/src/imgFrame.cpp
image/test/reftest/gif/reftest.list
image/test/reftest/gif/tile-transform-ref.html
image/test/reftest/gif/tile-transform.html
image/test/reftest/gif/tiletest-ref.png
image/test/reftest/gif/tiletest.gif
--- a/image/src/imgFrame.cpp
+++ b/image/src/imgFrame.cpp
@@ -447,17 +447,17 @@ imgFrame::SurfaceForDrawing(bool        
     // Fill 'available' with whatever we've got
     if (mSinglePixel) {
       target->FillRect(ToRect(aRegion.Intersect(available).Rect()),
                        ColorPattern(mSinglePixelColor),
                        DrawOptions(1.0f, CompositionOp::OP_SOURCE));
     } else {
       SurfacePattern pattern(aSurface,
                              ExtendMode::REPEAT,
-                             ToMatrix(aContext->CurrentMatrix()));
+                             Matrix::Translation(mDecoded.x, mDecoded.y));
       target->FillRect(ToRect(aRegion.Intersect(available).Rect()), pattern);
     }
 
     RefPtr<SourceSurface> newsurf = target->Snapshot();
     return SurfaceWithFormat(new gfxSurfaceDrawable(newsurf, ThebesIntSize(size)), target->GetFormat());
   }
 
   // Not tiling, and we have a surface, so we can account for
--- a/image/test/reftest/gif/reftest.list
+++ b/image/test/reftest/gif/reftest.list
@@ -17,16 +17,19 @@
 random == delaytest.html?transparent-animation.gif transparent-animation-finalframe.gif # incorrect timing dependence (bug 558678)
 
 # test for bug 641198
 skip-if(B2G) random-if(Android) == test_bug641198.html animation2a-finalframe.gif # bug 773482
 
 # Bug 1062886: a gif with a single color and an offset
 == one-color-offset.gif one-color-offset-ref.gif
 
+# Bug 1068230
+== tile-transform.html tile-transform-ref.html
+
 # webcam-simulacrum.mgif is a hand-edited file containing red.gif and blue.gif,
 # concatenated together with the relevant headers for
 # multipart/x-mixed-replace. Specifically, with the headers in
 # webcam-simulacrum.mjpg^headers^, the web browser will get the following:
 #
 # HTTP 200 OK
 # Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG
 # 
new file mode 100644
--- /dev/null
+++ b/image/test/reftest/gif/tile-transform-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1068230
+-->
+<html>
+<head>
+  <title>Intermediate surface should be transformed correctly when tiling an image</title>
+</head>
+<body>
+<button style="margin: 10px; padding: 10px; border: none; background: url('tiletest-ref.png');"></button>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/image/test/reftest/gif/tile-transform.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1068230
+-->
+<html>
+<head>
+  <title>Intermediate surface should be transformed correctly when tiling an image</title>
+</head>
+<body>
+<button style="margin: 10px; padding: 10px; border: none; background: url('tiletest.gif');"></button>
+</body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b493899cc87a4e872d18b27927b4e40eb630bab3
GIT binary patch
literal 282
zc%17D@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!5(0ceTp1WFIleOpd|;4x&Y<vs
zLE}1u!3743;|vb_89cT#_^)ROU%`;DfFWZ#Lw-L)MLR=%14DZ`Lw^Co^bCgi@eIo&
z7&Zhj>~Lo|;J|Rgg5iPz!*vaY`w9%t#Tnl7Gkj-fuz09)251*!NswPKgTu2MX+Tbf
zr;B4q#NoHs9GMy!7+5cQx(aEwbiJ$huD*TqUwIdMnBvCC8md~IQAzrR6Eal#gw`JM
zTr}CjJ4U6dbM+AgL$5n3?}Yd}Js)X)oK)d`MyUIU*2jrIymEwoI@V2)f5Hx>>g(jV
We=vT$$h87!CxfS}pUXO@geCxKJz+Zl
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7a04c9654a671361133f554050efda4b2c12ffc2
GIT binary patch
literal 156
zc${<hbhEHbWMoia_`<-z@tr~71B1kK289O<8rK;NE-+XeXK>ih;IW;-e?3F^3WkIQ
z3>niI^7|Po+8OE_7~0Dj`U@DQXE4l<XILJ=upxk9hdaXo2Zj?C3>OR-u4^#dS73N9
z&hVa};X6A65Gej+0Z|M(3=E7wD9^yaDybmA!5k>TK1qZ7vIW10r*LSb__R#v>y?TO
F)&TJcDXstj