Bug 1180971 - Fix X11 SHM invalidation regions on HiDPI with GTK3. r=karlt
authorAndrew Comminos <acomminos@mozilla.com>
Mon, 06 Jul 2015 16:57:00 +0200
changeset 251729 2c988eb3e59cb8c4681413d49a58e6546558416f
parent 251728 0fa40c837b5345fca7b423a9a39180b5dd018789
child 251730 f2f753133ee9870c649c627bd1a493d6fde21d4a
push id29007
push userryanvm@gmail.com
push dateTue, 07 Jul 2015 18:38:06 +0000
treeherdermozilla-central@9340658848d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1180971
milestone42.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 1180971 - Fix X11 SHM invalidation regions on HiDPI with GTK3. r=karlt
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2264,17 +2264,17 @@ nsWindow::OnExposeEvent(cairo_t *cr)
                 ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
                 ctx->SetPattern(pattern);
                 ctx->Paint();
             }
         }
     }
 #  ifdef MOZ_HAVE_SHMIMAGE
     if (mShmImage && MOZ_LIKELY(!mIsDestroyed)) {
-        mShmImage->Put(mGdkWindow, exposeRegion);
+        mShmImage->Put(mGdkWindow, region);
     }
 #  endif  // MOZ_HAVE_SHMIMAGE
 #endif // MOZ_X11
 
     listener->DidPaintWindow();
 
     // Synchronously flush any new dirty areas
 #if (MOZ_WIDGET_GTK == 2)
@@ -6173,21 +6173,16 @@ nsWindow::EndRemoteDrawingInRegion(DrawT
   if (!mGdkWindow || mIsFullyObscured || !mHasMappedToplevel || mIsDestroyed ||
       !mShmImage)
     return;
 
   if (mThebesSurface) {
     aInvalidRegion.AndWith(nsIntRect(nsIntPoint(0, 0), mThebesSurface->GetSize()));
   }
 
-  gint scale = GdkScaleFactor();
-  if (scale != 1) {
-    aInvalidRegion.ScaleInverseRoundOut(scale, scale);
-  }
-
   mShmImage->Put(mGdkWindow, aInvalidRegion);
 
 #  endif // MOZ_HAVE_SHMIMAGE
 #endif // MOZ_X11
 }
 
 // return the gfxASurface for rendering to this widget
 gfxASurface*