Bug 1297831 - Add a RequiresAcceleratedGLContextForCompositorOGL gfxVar for CompositorOGL. r=jgilbert

MozReview-Commit-ID: 9hZMvG8bPvd

--HG--
extra : rebase_source : 164282b35171865eecade7a4e17927daa16ae66a
This commit is contained in:
Ryan Hunt 2016-08-24 14:03:00 -04:00
parent a855ce5afd
commit 51dd4314b5
3 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,8 @@ class gfxVarReceiver;
_(TileSize, IntSize, IntSize(-1, -1)) \
_(UseXRender, bool, false) \
_(OffscreenFormat, gfxImageFormat, mozilla::gfx::SurfaceFormat::X8R8G8B8_UINT32) \
_(RequiresAcceleratedGLContextForCompositorOGL, bool, false) \
/* Add new entries above this line. */
// Some graphics settings are computed on the UI process and must be

View File

@ -136,7 +136,7 @@ CompositorOGL::CreateContext()
if (!context) {
context = gl::GLContextProvider::CreateForCompositorWidget(mWidget,
gfxPlatform::GetPlatform()->RequiresAcceleratedGLContextForCompositorOGL());
gfxVars::RequiresAcceleratedGLContextForCompositorOGL());
}
if (!context) {

View File

@ -2111,6 +2111,8 @@ gfxPlatform::InitAcceleration()
if (XRE_IsParentProcess()) {
gfxVars::SetBrowserTabsRemoteAutostart(BrowserTabsRemoteAutostart());
gfxVars::SetOffscreenFormat(GetOffscreenFormat());
gfxVars::SetRequiresAcceleratedGLContextForCompositorOGL(
RequiresAcceleratedGLContextForCompositorOGL());
}
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();