Bug 1284934 - Use gfxPrefs to check ASAP mode in GLContextProviderGLX. r=jgilbert
MozReview-Commit-ID: 8F2hP1gt65V
--- 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() {