Add IsPath to GrGLInterface
authorcdalton <cdalton@nvidia.com>
Thu, 17 Jul 2014 16:28:36 +0000 (09:28 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Jul 2014 16:28:36 +0000 (09:28 -0700)
This will be used by path ranges.

BUG=skia:
R=bsalomon@google.com

Author: cdalton@nvidia.com

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

include/gpu/gl/GrGLFunctions.h
include/gpu/gl/GrGLInterface.h
src/gpu/gl/GrGLAssembleGLESInterface.h
src/gpu/gl/GrGLAssembleInterface.cpp
src/gpu/gl/GrGLInterface.cpp

index f31ae8a..093c7d1 100644 (file)
@@ -234,6 +234,7 @@ extern "C" {
     typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPathParameterfProc)(GrGLuint path, GrGLenum pname, GrGLfloat value);
     typedef GrGLuint (GR_GL_FUNCTION_TYPE* GrGLGenPathsProc)(GrGLsizei range);
     typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDeletePathsProc)(GrGLuint path, GrGLsizei range);
+    typedef GrGLboolean (GR_GL_FUNCTION_TYPE* GrGLIsPathProc)(GrGLuint path);
     typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPathStencilFuncProc)(GrGLenum func, GrGLint ref, GrGLuint mask);
     typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilFillPathProc)(GrGLuint path, GrGLenum fillMode, GrGLuint mask);
     typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilStrokePathProc)(GrGLuint path, GrGLint reference, GrGLuint mask);
index add7ee2..7bf382c 100644 (file)
@@ -324,6 +324,7 @@ public:
         GLPtr<GrGLPathParameterfProc> fPathParameterf;
         GLPtr<GrGLGenPathsProc> fGenPaths;
         GLPtr<GrGLDeletePathsProc> fDeletePaths;
+        GLPtr<GrGLIsPathProc> fIsPath;
         GLPtr<GrGLPathStencilFuncProc> fPathStencilFunc;
         GLPtr<GrGLStencilFillPathProc> fStencilFillPath;
         GLPtr<GrGLStencilStrokePathProc> fStencilStrokePath;
index 43f48c2..d3ebebd 100644 (file)
@@ -266,6 +266,7 @@ static const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get
         GET_PROC_SUFFIX(PathParameterf, NV);
         GET_PROC_SUFFIX(GenPaths, NV);
         GET_PROC_SUFFIX(DeletePaths, NV);
+        GET_PROC_SUFFIX(IsPath, NV);
         GET_PROC_SUFFIX(PathStencilFunc, NV);
         GET_PROC_SUFFIX(StencilFillPath, NV);
         GET_PROC_SUFFIX(StencilStrokePath, NV);
index 4c02a6e..c6b3f93 100644 (file)
@@ -228,6 +228,7 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
         GET_PROC_SUFFIX(PathParameterf, NV);
         GET_PROC_SUFFIX(GenPaths, NV);
         GET_PROC_SUFFIX(DeletePaths, NV);
+        GET_PROC_SUFFIX(IsPath, NV);
         GET_PROC_SUFFIX(PathStencilFunc, NV);
         GET_PROC_SUFFIX(StencilFillPath, NV);
         GET_PROC_SUFFIX(StencilStrokePath, NV);
index 89e23f7..823b73e 100644 (file)
@@ -45,6 +45,7 @@ const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
     newInterface->fFunctions.fPathParameterf = NULL;
     newInterface->fFunctions.fGenPaths = NULL;
     newInterface->fFunctions.fDeletePaths = NULL;
+    newInterface->fFunctions.fIsPath = NULL;
     newInterface->fFunctions.fPathStencilFunc = NULL;
     newInterface->fFunctions.fStencilFillPath = NULL;
     newInterface->fFunctions.fStencilStrokePath = NULL;
@@ -457,6 +458,7 @@ bool GrGLInterface::validate() const {
             NULL == fFunctions.fPathParameterf ||
             NULL == fFunctions.fGenPaths ||
             NULL == fFunctions.fDeletePaths ||
+            NULL == fFunctions.fIsPath ||
             NULL == fFunctions.fPathStencilFunc ||
             NULL == fFunctions.fStencilFillPath ||
             NULL == fFunctions.fStencilStrokePath ||