Bug 945088 - Use the correct device offset in gfxContext. r=mattwoodrow, a=bkerensa
authorNicholas Cameron <ncameron@mozilla.com>
Mon, 09 Dec 2013 21:04:44 +1300
changeset 175227 6e64771384ca4ee81f2954bb2795a468d929b520
parent 175226 f29de6851d3cbfd5ebe8aea33dcb48b8fcb25395
child 175228 b0b118d4ec72c1c3a00e4920d0bd989a8ff567f7
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, bkerensa
bugs945088
milestone28.0a2
Bug 945088 - Use the correct device offset in gfxContext. r=mattwoodrow, a=bkerensa
gfx/thebes/gfxContext.cpp
layout/reftests/bugs/reftest.list
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -171,18 +171,20 @@ gfxContext::CurrentSurface(gfxFloat *dx,
     if (dx && dy)
         cairo_surface_get_device_offset(s, dx, dy);
     return gfxASurface::Wrap(s);
   } else {
     if (mDT->GetType() == BACKEND_CAIRO) {
         cairo_surface_t *s =
             (cairo_surface_t*)mDT->GetNativeSurface(NATIVE_SURFACE_CAIRO_SURFACE);
         if (s) {
-            if (dx && dy)
-                cairo_surface_get_device_offset(s, dx, dy);
+            if (dx && dy) {
+                *dx = -CurrentState().deviceOffset.x;
+                *dy = -CurrentState().deviceOffset.y;
+            }
             return gfxASurface::Wrap(s);
         }
     }
 
     if (dx && dy) {
       *dx = *dy = 0;
     }
     // An Azure context doesn't have a surface backing it.
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1781,9 +1781,9 @@ fuzzy-if(Android,8,400) == 906199-1.html
 == 921716-1.html 921716-1-ref.html
 fuzzy-if(cocoaWidget,1,40) == 928607-1.html 928607-1-ref.html
 == 931464-1.html 931464-1-ref.html
 == 931853.html 931853-ref.html
 == 931853-quirks.html 931853-quirks-ref.html
 == 936670-1.svg 936670-1-ref.svg
 == 941940-1.html 941940-1-ref.html
 == 942017.html 942017-ref.html
-fails-if(winWidget&&!d2d) == 942672-1.html 942672-1-ref.html
+== 942672-1.html 942672-1-ref.html