From 8dd90cb1fd541b9a2a264725e3dfeae736c91e22 Mon Sep 17 00:00:00 2001 From: cdalton Date: Thu, 17 Jul 2014 09:28:36 -0700 Subject: [PATCH] Add IsPath to GrGLInterface 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 | 1 + include/gpu/gl/GrGLInterface.h | 1 + src/gpu/gl/GrGLAssembleGLESInterface.h | 1 + src/gpu/gl/GrGLAssembleInterface.cpp | 1 + src/gpu/gl/GrGLInterface.cpp | 2 ++ 5 files changed, 6 insertions(+) diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h index f31ae8a2a3..093c7d1087 100644 --- a/include/gpu/gl/GrGLFunctions.h +++ b/include/gpu/gl/GrGLFunctions.h @@ -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); diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index add7ee2567..7bf382c05d 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -324,6 +324,7 @@ public: GLPtr fPathParameterf; GLPtr fGenPaths; GLPtr fDeletePaths; + GLPtr fIsPath; GLPtr fPathStencilFunc; GLPtr fStencilFillPath; GLPtr fStencilStrokePath; diff --git a/src/gpu/gl/GrGLAssembleGLESInterface.h b/src/gpu/gl/GrGLAssembleGLESInterface.h index 43f48c2594..d3ebebd756 100644 --- a/src/gpu/gl/GrGLAssembleGLESInterface.h +++ b/src/gpu/gl/GrGLAssembleGLESInterface.h @@ -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); diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp index 4c02a6eb58..c6b3f93793 100644 --- a/src/gpu/gl/GrGLAssembleInterface.cpp +++ b/src/gpu/gl/GrGLAssembleInterface.cpp @@ -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); diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 89e23f79f1..823b73efa3 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -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 ||