Bug 998821. Only use XShm for drawing if XShm allocation actually succeeded. r=karlt
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 22 Apr 2014 15:11:42 +1200
changeset 198460 2293861712300b82d8aa5e347775178086d1bc01
parent 198459 f3aaa298ed2ba84a8dccf8570c8f729ef81ae90a
child 198461 0920db1ab388e4a6f32a9cdb49d769988ded3d0c
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)
reviewerskarlt
bugs998821
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 998821. Only use XShm for drawing if XShm allocation actually succeeded. r=karlt
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2215,17 +2215,17 @@ nsWindow::OnExposeEvent(cairo_t *cr)
 
                 ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
                 ctx->SetPattern(pattern);
                 ctx->Paint();
             }
         }
     }
 #  ifdef MOZ_HAVE_SHMIMAGE
-    if (nsShmImage::UseShm() && MOZ_LIKELY(!mIsDestroyed)) {
+    if (mShmImage && MOZ_LIKELY(!mIsDestroyed)) {
 #if (MOZ_WIDGET_GTK == 2)
         mShmImage->Put(mGdkWindow, exposeRegion.mRects, exposeRegion.mRectsEnd);
 #else
         mShmImage->Put(mGdkWindow, exposeRegion.mRects);
 #endif
     }
 #  endif  // MOZ_HAVE_SHMIMAGE
 #endif // MOZ_X11