Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 345723002: Add functions to support NV_path_rendering in OpenGL ES (Closed) Base URL: https://skia.googlesource.com/skia.git@desktop-es
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698