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 179970 2293861712300b82d8aa5e347775178086d1bc01
parent 179969 f3aaa298ed2ba84a8dccf8570c8f729ef81ae90a
child 179971 0920db1ab388e4a6f32a9cdb49d769988ded3d0c
push id6489
push userryanvm@gmail.com
push dateThu, 24 Apr 2014 17:43:19 +0000
treeherderb2g-inbound@f31baef145d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs998821
milestone31.0a1
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