From 7f001c6f335afd50bc9a7673a518a95a300108bd Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 8 Feb 2017 23:16:44 -0500 Subject: [PATCH] Bug 1331066 - Use gfxVars instead of a compile-time flag for webrender-conditional code. r=sotaro MozReview-Commit-ID: KEbHPXSMNRJ --- gfx/gl/GLContextProviderWGL.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gfx/gl/GLContextProviderWGL.cpp b/gfx/gl/GLContextProviderWGL.cpp index 5fc8a61a5e39..fef511b73586 100644 --- a/gfx/gl/GLContextProviderWGL.cpp +++ b/gfx/gl/GLContextProviderWGL.cpp @@ -68,15 +68,7 @@ WGLLibrary::CreateDummyWindow(HDC* aWindowDC) pfd.cGreenBits = 8; pfd.cBlueBits = 8; pfd.cAlphaBits = 8; -#ifdef MOZ_ENABLE_WEBRENDER - // XXX We might need to set this to 0 if the compositor that requires - // this context is not a WebRender compositor. Getting the - // CompositorOptions here is nontrivial though so for now we just use - // the ifdef guard. - pfd.cDepthBits = 24; -#else - pfd.cDepthBits = 0; -#endif + pfd.cDepthBits = gfxVars::UseWebRender() ? 24 : 0; pfd.iLayerType = PFD_MAIN_PLANE; mWindowPixelFormat = ChoosePixelFormat(dc, &pfd);