diff options
author | cdalton <cdalton@nvidia.com> | 2014-08-11 14:05:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-11 14:05:05 -0700 |
commit | c7103a104fdc7150b4e3c0d3efc42735ad359616 (patch) | |
tree | 3e11441cfff0533cf05b542b9718036eb52ef757 /include | |
parent | 5acfea789d39106dbc706c6ee85cd8f027fce3ed (diff) |
Wrap NV_path_rendering API with GrGLPathRendering
Adds a GrGLPathRendering class that wraps the NV_path_rendering
extension and manages its various API versions. It also provides
backup implementations when certain NVpr methods from later API
versions are not present on the current system.
BUG=skia:
R=bungeman@google.com, bsalomon@google.com, kkinnunen@nvidia.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/444223002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/gl/GrGLFunctions.h | 3 | ||||
-rw-r--r-- | include/gpu/gl/GrGLInterface.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index 584ad27ae1..84b6c29d57 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -245,11 +245,12 @@ extern "C" { typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCoverStrokePathProc)(GrGLuint name, GrGLenum coverMode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCoverFillPathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCoverStrokePathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat* transformValues); + // NV_path_rendering v1.2 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilThenCoverFillPathProc)(GrGLuint path, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilThenCoverStrokePathProc)(GrGLuint path, GrGLint reference, GrGLuint mask, GrGLenum coverMode); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilThenCoverFillPathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLenum fillMode, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues); typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilThenCoverStrokePathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues); - + // NV_path_rendering v1.3 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLProgramPathFragmentInputGenProc)(GrGLuint program, GrGLint location, GrGLenum genMode, GrGLint components,const GrGLfloat *coeffs); } // extern "C" diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index 835b374ebc..e2a204962b 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -335,10 +335,12 @@ public: GLPtr<GrGLCoverStrokePathProc> fCoverStrokePath; GLPtr<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced; GLPtr<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced; + // NV_path_rendering v1.2 GLPtr<GrGLStencilThenCoverFillPathProc> fStencilThenCoverFillPath; GLPtr<GrGLStencilThenCoverStrokePathProc> fStencilThenCoverStrokePath; GLPtr<GrGLStencilThenCoverFillPathInstancedProc> fStencilThenCoverFillPathInstanced; GLPtr<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced; + // NV_path_rendering v1.3 GLPtr<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen; } fFunctions; |