Fix GLCaps order for CoreProfile
authoregdaniel <egdaniel@google.com>
Mon, 26 Oct 2015 15:59:10 +0000 (08:59 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 26 Oct 2015 15:59:10 +0000 (08:59 -0700)
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1417503005

src/gpu/gl/GrGLCaps.cpp

index 91bcd72..ddb6c80 100644 (file)
@@ -64,9 +64,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
     GrGLStandard standard = ctxInfo.standard();
     GrGLVersion version = ctxInfo.version();
 
-    this->initGLSL(ctxInfo);
-    GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
-
     /**************************************************************************
      * Caps specific to GrGLCaps
      **************************************************************************/
@@ -289,6 +286,10 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
     * GrShaderCaps fields
     **************************************************************************/
 
+    // This must be called after fCoreProfile is set on the GrGLCaps
+    this->initGLSL(ctxInfo);
+    GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
+
     glslCaps->fPathRenderingSupport = this->hasPathRenderingSupport(ctxInfo, gli);
 
     // For now these two are equivalent but we could have dst read in shader via some other method.