Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index 6fe804f2f89cba82830df271f0c54172c3d29119..4721deeb607597fd7c61b1053ab5253048e56b12 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -117,12 +117,9 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { |
GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask); |
fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT); |
} |
- if (!fIsCoreProfile) { |
- GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_COORDS, &fMaxFixedFunctionTextureCoords); |
- // Sanity check |
- SkASSERT(fMaxFixedFunctionTextureCoords > 0 && fMaxFixedFunctionTextureCoords < 128); |
- } |
} |
+ |
+ |
GR_GL_GetIntegerv(gli, GR_GL_MAX_VERTEX_ATTRIBS, &fMaxVertexAttributes); |
GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &fMaxFragmentTextureUnits); |
@@ -323,8 +320,15 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { |
// attachment, hence this min: |
fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); |
- fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering") && |
- ctxInfo.hasExtension("GL_EXT_direct_state_access"); |
+ fPathRenderingSupport = (ctxInfo.hasExtension("GL_NV_path_rendering") && |
+ ctxInfo.hasExtension("GL_EXT_direct_state_access")) |
+ || ctxInfo.hasExtension("GL_CHROMIUM_path_rendering"); |
+ |
+ if (fPathRenderingSupport) { |
+ GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_COORDS, &fMaxFixedFunctionTextureCoords); |
+ // Sanity check |
+ SkASSERT(fMaxFixedFunctionTextureCoords > 0 && fMaxFixedFunctionTextureCoords < 128); |
+ } |
fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); |
@@ -659,7 +663,7 @@ SkString GrGLCaps::dump() const { |
r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType]); |
r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); |
r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits); |
- if (!fIsCoreProfile) { |
+ if (this->pathRenderingSupport()) { |
r.appendf("Max Fixed Function Texture Coords: %d\n", fMaxFixedFunctionTextureCoords); |
} |
r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); |