Bug 1284934 - Use gfxPrefs to check ASAP mode in GLContextProviderGLX. r=jgilbert
authorAndrew Comminos <andrew@comminos.com>
Wed, 06 Jul 2016 13:18:45 -0400
changeset 329727 f95ff5bf4df8130b6deccfb5cf724a85c99bc380
parent 329726 621f32c868bb5654a1ae2dc25cbb622b3c0efd69
child 329728 b4484a7069fbc7b6131fa370d96301b00a57b9e8
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1284934
milestone50.0a1
Bug 1284934 - Use gfxPrefs to check ASAP mode in GLContextProviderGLX. r=jgilbert MozReview-Commit-ID: 8F2hP1gt65V
gfx/gl/GLContextProviderGLX.cpp
--- a/gfx/gl/GLContextProviderGLX.cpp
+++ b/gfx/gl/GLContextProviderGLX.cpp
@@ -942,18 +942,18 @@ GLContextGLX::MakeCurrentImpl(bool aForc
     if (aForce || mGLX->xGetCurrentContext() != mContext) {
         succeeded = mGLX->xMakeCurrent(mDisplay, mDrawable, mContext);
         NS_ASSERTION(succeeded, "Failed to make GL context current!");
 
         if (!IsOffscreen() && mGLX->SupportsSwapControl()) {
             // Many GLX implementations default to blocking until the next
             // VBlank when calling glXSwapBuffers. We want to run unthrottled
             // in ASAP mode. See bug 1280744.
-            int interval = gfxPlatform::IsInLayoutAsapMode() ? 0 : 1;
-            mGLX->xSwapInterval(mDisplay, mDrawable, interval);
+            const bool isASAP = (gfxPrefs::LayoutFrameRate() == 0);
+            mGLX->xSwapInterval(mDisplay, mDrawable, isASAP ? 0 : 1);
         }
     }
 
     return succeeded;
 }
 
 bool
 GLContextGLX::IsCurrent() {