Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index 4a62c5acaab1ce370545f9b11d991153260d0e3f..c462fd8b7cd6e2206dfef420955556e3fc7b10e1 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -311,8 +311,22 @@ bool 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"); |
+ |
+ if (fPathRenderingSupport) { |
+ if (kGL_GrGLStandard == standard) { |
+ // Set fMaxFixedFunctionTextureCoords = 0 here if you want to force |
+ // ProgramPathFragmentInputGen usage on desktop. |
+ fPathRenderingSupport = ctxInfo.hasExtension("GL_EXT_direct_state_access") && |
+ (fMaxFixedFunctionTextureCoords > 0 || |
+ ((ctxInfo.version() >= GR_GL_VER(4,3) || |
+ ctxInfo.hasExtension("GL_ARB_program_interface_query")) && |
+ NULL != gli->fFunctions.fProgramPathFragmentInputGen)); |
bsalomon
2014/07/02 13:25:33
Can you explain in a comment why you're looking fo
Kimmo Kinnunen
2014/07/03 05:43:20
Added following:
// We need one of the two possibl
|
+ } else { |
+ // Note: path rendering is not yet implemented for GLES. |
+ fPathRenderingSupport = ctxInfo.version() >= GR_GL_VER(3,1) && false; |
+ } |
+ } |
fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); |