Replace GrGLInterface's function pointers with std::functions.

This is to facilitate binding to GLES2Interface in Chromium rather than the C interface. It requires capturing the GLES2Interface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674823002

Review URL: https://codereview.chromium.org/1674823002
This commit is contained in:
bsalomon 2016-02-08 07:22:17 -08:00 committed by Commit bot
parent cdad12f3b1
commit 9f2dc27642
5 changed files with 319 additions and 336 deletions

View File

@ -39,10 +39,10 @@ public:
* NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail.
*/
bool init(GrGLStandard standard,
GrGLGetStringProc getString,
GrGLGetStringiProc getStringi,
GrGLGetIntegervProc getIntegerv,
GrEGLQueryStringProc queryString = nullptr,
GrGLFunction<GrGLGetStringProc> getString,
GrGLFunction<GrGLGetStringiProc> getStringi,
GrGLFunction<GrGLGetIntegervProc> getIntegerv,
GrGLFunction<GrEGLQueryStringProc> queryString = nullptr,
GrEGLDisplay eglDisplay = nullptr);
bool isInitialized() const { return fInitialized; }

View File

@ -9,7 +9,9 @@
#ifndef GrGLFunctions_DEFINED
#define GrGLFunctions_DEFINED
#include <functional>
#include "GrGLTypes.h"
#include "../private/SkTLogic.h"
extern "C" {
@ -351,4 +353,7 @@ typedef GrEGLImage (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy,
typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay dpy, GrEGLImage image);
} // extern "C"
template <typename GLPTR> using GrGLFunction =
std::function<typename std::remove_pointer<GLPTR>::type>;
#endif

View File

@ -105,28 +105,6 @@ const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*,
*/
struct SK_API GrGLInterface : public SkRefCnt {
private:
// simple wrapper class that exists only to initialize a pointer to NULL
template <typename FNPTR_TYPE> class GLPtr {
public:
GLPtr() : fPtr(NULL) {}
GLPtr(const GLPtr&) = delete;
GLPtr& operator=(FNPTR_TYPE ptr) { fPtr = ptr; return *this; }
operator FNPTR_TYPE() const { return fPtr; }
private:
FNPTR_TYPE fPtr;
};
// This is a temporary workaround to keep Chromium's GrGLInterface factories compiling until
// they're updated to use the Functions struct.
template <typename FNPTR_TYPE> class GLPtrAlias {
public:
explicit GLPtrAlias(GLPtr<FNPTR_TYPE>* base) : fBase(base) {}
GLPtrAlias(const GLPtrAlias&) = delete;
void operator=(FNPTR_TYPE ptr) { *fBase = ptr; }
private:
GLPtr<FNPTR_TYPE>* fBase;
};
typedef SkRefCnt INHERITED;
public:
@ -154,113 +132,113 @@ public:
* operator.
*/
struct Functions {
GLPtr<GrGLActiveTextureProc> fActiveTexture;
GLPtr<GrGLAttachShaderProc> fAttachShader;
GLPtr<GrGLBeginQueryProc> fBeginQuery;
GLPtr<GrGLBindAttribLocationProc> fBindAttribLocation;
GLPtr<GrGLBindBufferProc> fBindBuffer;
GLPtr<GrGLBindFragDataLocationProc> fBindFragDataLocation;
GLPtr<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed;
GLPtr<GrGLBindFramebufferProc> fBindFramebuffer;
GLPtr<GrGLBindRenderbufferProc> fBindRenderbuffer;
GLPtr<GrGLBindTextureProc> fBindTexture;
GLPtr<GrGLBindVertexArrayProc> fBindVertexArray;
GLPtr<GrGLBlendBarrierProc> fBlendBarrier;
GLPtr<GrGLBlendColorProc> fBlendColor;
GLPtr<GrGLBlendEquationProc> fBlendEquation;
GLPtr<GrGLBlendFuncProc> fBlendFunc;
GLPtr<GrGLBlitFramebufferProc> fBlitFramebuffer;
GLPtr<GrGLBufferDataProc> fBufferData;
GLPtr<GrGLBufferSubDataProc> fBufferSubData;
GLPtr<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus;
GLPtr<GrGLClearProc> fClear;
GLPtr<GrGLClearColorProc> fClearColor;
GLPtr<GrGLClearStencilProc> fClearStencil;
GLPtr<GrGLColorMaskProc> fColorMask;
GLPtr<GrGLCompileShaderProc> fCompileShader;
GLPtr<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
GLPtr<GrGLCompressedTexSubImage2DProc> fCompressedTexSubImage2D;
GLPtr<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D;
GLPtr<GrGLCreateProgramProc> fCreateProgram;
GLPtr<GrGLCreateShaderProc> fCreateShader;
GLPtr<GrGLCullFaceProc> fCullFace;
GLPtr<GrGLDeleteBuffersProc> fDeleteBuffers;
GLPtr<GrGLDeleteFramebuffersProc> fDeleteFramebuffers;
GLPtr<GrGLDeleteProgramProc> fDeleteProgram;
GLPtr<GrGLDeleteQueriesProc> fDeleteQueries;
GLPtr<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers;
GLPtr<GrGLDeleteShaderProc> fDeleteShader;
GLPtr<GrGLDeleteTexturesProc> fDeleteTextures;
GLPtr<GrGLDeleteVertexArraysProc> fDeleteVertexArrays;
GLPtr<GrGLDepthMaskProc> fDepthMask;
GLPtr<GrGLDisableProc> fDisable;
GLPtr<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray;
GLPtr<GrGLDrawArraysProc> fDrawArrays;
GLPtr<GrGLDrawArraysIndirectProc> fDrawArraysIndirect;
GLPtr<GrGLDrawArraysInstancedProc> fDrawArraysInstanced;
GLPtr<GrGLDrawBufferProc> fDrawBuffer;
GLPtr<GrGLDrawBuffersProc> fDrawBuffers;
GLPtr<GrGLDrawElementsProc> fDrawElements;
GLPtr<GrGLDrawElementsIndirectProc> fDrawElementsIndirect;
GLPtr<GrGLDrawElementsInstancedProc> fDrawElementsInstanced;
GLPtr<GrGLEnableProc> fEnable;
GLPtr<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray;
GLPtr<GrGLEndQueryProc> fEndQuery;
GLPtr<GrGLFinishProc> fFinish;
GLPtr<GrGLFlushProc> fFlush;
GLPtr<GrGLFlushMappedBufferRangeProc> fFlushMappedBufferRange;
GLPtr<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
GLPtr<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
GLPtr<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;
GLPtr<GrGLFrontFaceProc> fFrontFace;
GLPtr<GrGLGenBuffersProc> fGenBuffers;
GLPtr<GrGLGenFramebuffersProc> fGenFramebuffers;
GLPtr<GrGLGenerateMipmapProc> fGenerateMipmap;
GLPtr<GrGLGenQueriesProc> fGenQueries;
GLPtr<GrGLGenRenderbuffersProc> fGenRenderbuffers;
GLPtr<GrGLGenTexturesProc> fGenTextures;
GLPtr<GrGLGenVertexArraysProc> fGenVertexArrays;
GLPtr<GrGLGetBufferParameterivProc> fGetBufferParameteriv;
GLPtr<GrGLGetErrorProc> fGetError;
GLPtr<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv;
GLPtr<GrGLGetIntegervProc> fGetIntegerv;
GLPtr<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v;
GLPtr<GrGLGetQueryObjectivProc> fGetQueryObjectiv;
GLPtr<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v;
GLPtr<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv;
GLPtr<GrGLGetQueryivProc> fGetQueryiv;
GLPtr<GrGLGetProgramInfoLogProc> fGetProgramInfoLog;
GLPtr<GrGLGetProgramivProc> fGetProgramiv;
GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
GLPtr<GrGLGetShaderivProc> fGetShaderiv;
GLPtr<GrGLGetShaderPrecisionFormatProc> fGetShaderPrecisionFormat;
GLPtr<GrGLGetStringProc> fGetString;
GLPtr<GrGLGetStringiProc> fGetStringi;
GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation;
GLPtr<GrGLInsertEventMarkerProc> fInsertEventMarker;
GLPtr<GrGLInvalidateBufferDataProc> fInvalidateBufferData;
GLPtr<GrGLInvalidateBufferSubDataProc> fInvalidateBufferSubData;
GLPtr<GrGLInvalidateFramebufferProc> fInvalidateFramebuffer;
GLPtr<GrGLInvalidateSubFramebufferProc> fInvalidateSubFramebuffer;
GLPtr<GrGLInvalidateTexImageProc> fInvalidateTexImage;
GLPtr<GrGLInvalidateTexSubImageProc> fInvalidateTexSubImage;
GLPtr<GrGLIsTextureProc> fIsTexture;
GLPtr<GrGLLineWidthProc> fLineWidth;
GLPtr<GrGLLinkProgramProc> fLinkProgram;
GLPtr<GrGLMapBufferProc> fMapBuffer;
GLPtr<GrGLMapBufferRangeProc> fMapBufferRange;
GLPtr<GrGLMapBufferSubDataProc> fMapBufferSubData;
GLPtr<GrGLMapTexSubImage2DProc> fMapTexSubImage2D;
GLPtr<GrGLPixelStoreiProc> fPixelStorei;
GLPtr<GrGLPopGroupMarkerProc> fPopGroupMarker;
GLPtr<GrGLPushGroupMarkerProc> fPushGroupMarker;
GLPtr<GrGLQueryCounterProc> fQueryCounter;
GLPtr<GrGLRasterSamplesProc> fRasterSamples;
GLPtr<GrGLReadBufferProc> fReadBuffer;
GLPtr<GrGLReadPixelsProc> fReadPixels;
GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage;
GrGLFunction<GrGLActiveTextureProc> fActiveTexture;
GrGLFunction<GrGLAttachShaderProc> fAttachShader;
GrGLFunction<GrGLBeginQueryProc> fBeginQuery;
GrGLFunction<GrGLBindAttribLocationProc> fBindAttribLocation;
GrGLFunction<GrGLBindBufferProc> fBindBuffer;
GrGLFunction<GrGLBindFragDataLocationProc> fBindFragDataLocation;
GrGLFunction<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed;
GrGLFunction<GrGLBindFramebufferProc> fBindFramebuffer;
GrGLFunction<GrGLBindRenderbufferProc> fBindRenderbuffer;
GrGLFunction<GrGLBindTextureProc> fBindTexture;
GrGLFunction<GrGLBindVertexArrayProc> fBindVertexArray;
GrGLFunction<GrGLBlendBarrierProc> fBlendBarrier;
GrGLFunction<GrGLBlendColorProc> fBlendColor;
GrGLFunction<GrGLBlendEquationProc> fBlendEquation;
GrGLFunction<GrGLBlendFuncProc> fBlendFunc;
GrGLFunction<GrGLBlitFramebufferProc> fBlitFramebuffer;
GrGLFunction<GrGLBufferDataProc> fBufferData;
GrGLFunction<GrGLBufferSubDataProc> fBufferSubData;
GrGLFunction<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus;
GrGLFunction<GrGLClearProc> fClear;
GrGLFunction<GrGLClearColorProc> fClearColor;
GrGLFunction<GrGLClearStencilProc> fClearStencil;
GrGLFunction<GrGLColorMaskProc> fColorMask;
GrGLFunction<GrGLCompileShaderProc> fCompileShader;
GrGLFunction<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
GrGLFunction<GrGLCompressedTexSubImage2DProc> fCompressedTexSubImage2D;
GrGLFunction<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D;
GrGLFunction<GrGLCreateProgramProc> fCreateProgram;
GrGLFunction<GrGLCreateShaderProc> fCreateShader;
GrGLFunction<GrGLCullFaceProc> fCullFace;
GrGLFunction<GrGLDeleteBuffersProc> fDeleteBuffers;
GrGLFunction<GrGLDeleteFramebuffersProc> fDeleteFramebuffers;
GrGLFunction<GrGLDeleteProgramProc> fDeleteProgram;
GrGLFunction<GrGLDeleteQueriesProc> fDeleteQueries;
GrGLFunction<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers;
GrGLFunction<GrGLDeleteShaderProc> fDeleteShader;
GrGLFunction<GrGLDeleteTexturesProc> fDeleteTextures;
GrGLFunction<GrGLDeleteVertexArraysProc> fDeleteVertexArrays;
GrGLFunction<GrGLDepthMaskProc> fDepthMask;
GrGLFunction<GrGLDisableProc> fDisable;
GrGLFunction<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray;
GrGLFunction<GrGLDrawArraysProc> fDrawArrays;
GrGLFunction<GrGLDrawArraysIndirectProc> fDrawArraysIndirect;
GrGLFunction<GrGLDrawArraysInstancedProc> fDrawArraysInstanced;
GrGLFunction<GrGLDrawBufferProc> fDrawBuffer;
GrGLFunction<GrGLDrawBuffersProc> fDrawBuffers;
GrGLFunction<GrGLDrawElementsProc> fDrawElements;
GrGLFunction<GrGLDrawElementsIndirectProc> fDrawElementsIndirect;
GrGLFunction<GrGLDrawElementsInstancedProc> fDrawElementsInstanced;
GrGLFunction<GrGLEnableProc> fEnable;
GrGLFunction<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray;
GrGLFunction<GrGLEndQueryProc> fEndQuery;
GrGLFunction<GrGLFinishProc> fFinish;
GrGLFunction<GrGLFlushProc> fFlush;
GrGLFunction<GrGLFlushMappedBufferRangeProc> fFlushMappedBufferRange;
GrGLFunction<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
GrGLFunction<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
GrGLFunction<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;
GrGLFunction<GrGLFrontFaceProc> fFrontFace;
GrGLFunction<GrGLGenBuffersProc> fGenBuffers;
GrGLFunction<GrGLGenFramebuffersProc> fGenFramebuffers;
GrGLFunction<GrGLGenerateMipmapProc> fGenerateMipmap;
GrGLFunction<GrGLGenQueriesProc> fGenQueries;
GrGLFunction<GrGLGenRenderbuffersProc> fGenRenderbuffers;
GrGLFunction<GrGLGenTexturesProc> fGenTextures;
GrGLFunction<GrGLGenVertexArraysProc> fGenVertexArrays;
GrGLFunction<GrGLGetBufferParameterivProc> fGetBufferParameteriv;
GrGLFunction<GrGLGetErrorProc> fGetError;
GrGLFunction<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv;
GrGLFunction<GrGLGetIntegervProc> fGetIntegerv;
GrGLFunction<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v;
GrGLFunction<GrGLGetQueryObjectivProc> fGetQueryObjectiv;
GrGLFunction<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v;
GrGLFunction<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv;
GrGLFunction<GrGLGetQueryivProc> fGetQueryiv;
GrGLFunction<GrGLGetProgramInfoLogProc> fGetProgramInfoLog;
GrGLFunction<GrGLGetProgramivProc> fGetProgramiv;
GrGLFunction<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
GrGLFunction<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
GrGLFunction<GrGLGetShaderivProc> fGetShaderiv;
GrGLFunction<GrGLGetShaderPrecisionFormatProc> fGetShaderPrecisionFormat;
GrGLFunction<GrGLGetStringProc> fGetString;
GrGLFunction<GrGLGetStringiProc> fGetStringi;
GrGLFunction<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
GrGLFunction<GrGLGetUniformLocationProc> fGetUniformLocation;
GrGLFunction<GrGLInsertEventMarkerProc> fInsertEventMarker;
GrGLFunction<GrGLInvalidateBufferDataProc> fInvalidateBufferData;
GrGLFunction<GrGLInvalidateBufferSubDataProc> fInvalidateBufferSubData;
GrGLFunction<GrGLInvalidateFramebufferProc> fInvalidateFramebuffer;
GrGLFunction<GrGLInvalidateSubFramebufferProc> fInvalidateSubFramebuffer;
GrGLFunction<GrGLInvalidateTexImageProc> fInvalidateTexImage;
GrGLFunction<GrGLInvalidateTexSubImageProc> fInvalidateTexSubImage;
GrGLFunction<GrGLIsTextureProc> fIsTexture;
GrGLFunction<GrGLLineWidthProc> fLineWidth;
GrGLFunction<GrGLLinkProgramProc> fLinkProgram;
GrGLFunction<GrGLMapBufferProc> fMapBuffer;
GrGLFunction<GrGLMapBufferRangeProc> fMapBufferRange;
GrGLFunction<GrGLMapBufferSubDataProc> fMapBufferSubData;
GrGLFunction<GrGLMapTexSubImage2DProc> fMapTexSubImage2D;
GrGLFunction<GrGLPixelStoreiProc> fPixelStorei;
GrGLFunction<GrGLPopGroupMarkerProc> fPopGroupMarker;
GrGLFunction<GrGLPushGroupMarkerProc> fPushGroupMarker;
GrGLFunction<GrGLQueryCounterProc> fQueryCounter;
GrGLFunction<GrGLRasterSamplesProc> fRasterSamples;
GrGLFunction<GrGLReadBufferProc> fReadBuffer;
GrGLFunction<GrGLReadPixelsProc> fReadPixels;
GrGLFunction<GrGLRenderbufferStorageProc> fRenderbufferStorage;
// On OpenGL ES there are multiple incompatible extensions that add support for MSAA
// and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
@ -277,233 +255,233 @@ public:
// functionality.
// GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT;
GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT;
// GL_APPLE_framebuffer_multisample
GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE;
GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE;
// This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
// the standard function in ES3+ or GL 3.0+.
GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample;
GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample;
// Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
GLPtr<GrGLBindUniformLocationProc> fBindUniformLocation;
GrGLFunction<GrGLBindUniformLocationProc> fBindUniformLocation;
GLPtr<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer;
GLPtr<GrGLScissorProc> fScissor;
GLPtr<GrGLShaderSourceProc> fShaderSource;
GLPtr<GrGLStencilFuncProc> fStencilFunc;
GLPtr<GrGLStencilFuncSeparateProc> fStencilFuncSeparate;
GLPtr<GrGLStencilMaskProc> fStencilMask;
GLPtr<GrGLStencilMaskSeparateProc> fStencilMaskSeparate;
GLPtr<GrGLStencilOpProc> fStencilOp;
GLPtr<GrGLStencilOpSeparateProc> fStencilOpSeparate;
GLPtr<GrGLTexImage2DProc> fTexImage2D;
GLPtr<GrGLTexParameteriProc> fTexParameteri;
GLPtr<GrGLTexParameterivProc> fTexParameteriv;
GLPtr<GrGLTexSubImage2DProc> fTexSubImage2D;
GLPtr<GrGLTexStorage2DProc> fTexStorage2D;
GLPtr<GrGLTextureBarrierProc> fTextureBarrier;
GLPtr<GrGLDiscardFramebufferProc> fDiscardFramebuffer;
GLPtr<GrGLUniform1fProc> fUniform1f;
GLPtr<GrGLUniform1iProc> fUniform1i;
GLPtr<GrGLUniform1fvProc> fUniform1fv;
GLPtr<GrGLUniform1ivProc> fUniform1iv;
GLPtr<GrGLUniform2fProc> fUniform2f;
GLPtr<GrGLUniform2iProc> fUniform2i;
GLPtr<GrGLUniform2fvProc> fUniform2fv;
GLPtr<GrGLUniform2ivProc> fUniform2iv;
GLPtr<GrGLUniform3fProc> fUniform3f;
GLPtr<GrGLUniform3iProc> fUniform3i;
GLPtr<GrGLUniform3fvProc> fUniform3fv;
GLPtr<GrGLUniform3ivProc> fUniform3iv;
GLPtr<GrGLUniform4fProc> fUniform4f;
GLPtr<GrGLUniform4iProc> fUniform4i;
GLPtr<GrGLUniform4fvProc> fUniform4fv;
GLPtr<GrGLUniform4ivProc> fUniform4iv;
GLPtr<GrGLUniformMatrix2fvProc> fUniformMatrix2fv;
GLPtr<GrGLUniformMatrix3fvProc> fUniformMatrix3fv;
GLPtr<GrGLUniformMatrix4fvProc> fUniformMatrix4fv;
GLPtr<GrGLUnmapBufferProc> fUnmapBuffer;
GLPtr<GrGLUnmapBufferSubDataProc> fUnmapBufferSubData;
GLPtr<GrGLUnmapTexSubImage2DProc> fUnmapTexSubImage2D;
GLPtr<GrGLUseProgramProc> fUseProgram;
GLPtr<GrGLVertexAttrib1fProc> fVertexAttrib1f;
GLPtr<GrGLVertexAttrib2fvProc> fVertexAttrib2fv;
GLPtr<GrGLVertexAttrib3fvProc> fVertexAttrib3fv;
GLPtr<GrGLVertexAttrib4fvProc> fVertexAttrib4fv;
GLPtr<GrGLVertexAttribDivisorProc> fVertexAttribDivisor;
GLPtr<GrGLVertexAttribPointerProc> fVertexAttribPointer;
GLPtr<GrGLViewportProc> fViewport;
GrGLFunction<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer;
GrGLFunction<GrGLScissorProc> fScissor;
GrGLFunction<GrGLShaderSourceProc> fShaderSource;
GrGLFunction<GrGLStencilFuncProc> fStencilFunc;
GrGLFunction<GrGLStencilFuncSeparateProc> fStencilFuncSeparate;
GrGLFunction<GrGLStencilMaskProc> fStencilMask;
GrGLFunction<GrGLStencilMaskSeparateProc> fStencilMaskSeparate;
GrGLFunction<GrGLStencilOpProc> fStencilOp;
GrGLFunction<GrGLStencilOpSeparateProc> fStencilOpSeparate;
GrGLFunction<GrGLTexImage2DProc> fTexImage2D;
GrGLFunction<GrGLTexParameteriProc> fTexParameteri;
GrGLFunction<GrGLTexParameterivProc> fTexParameteriv;
GrGLFunction<GrGLTexSubImage2DProc> fTexSubImage2D;
GrGLFunction<GrGLTexStorage2DProc> fTexStorage2D;
GrGLFunction<GrGLTextureBarrierProc> fTextureBarrier;
GrGLFunction<GrGLDiscardFramebufferProc> fDiscardFramebuffer;
GrGLFunction<GrGLUniform1fProc> fUniform1f;
GrGLFunction<GrGLUniform1iProc> fUniform1i;
GrGLFunction<GrGLUniform1fvProc> fUniform1fv;
GrGLFunction<GrGLUniform1ivProc> fUniform1iv;
GrGLFunction<GrGLUniform2fProc> fUniform2f;
GrGLFunction<GrGLUniform2iProc> fUniform2i;
GrGLFunction<GrGLUniform2fvProc> fUniform2fv;
GrGLFunction<GrGLUniform2ivProc> fUniform2iv;
GrGLFunction<GrGLUniform3fProc> fUniform3f;
GrGLFunction<GrGLUniform3iProc> fUniform3i;
GrGLFunction<GrGLUniform3fvProc> fUniform3fv;
GrGLFunction<GrGLUniform3ivProc> fUniform3iv;
GrGLFunction<GrGLUniform4fProc> fUniform4f;
GrGLFunction<GrGLUniform4iProc> fUniform4i;
GrGLFunction<GrGLUniform4fvProc> fUniform4fv;
GrGLFunction<GrGLUniform4ivProc> fUniform4iv;
GrGLFunction<GrGLUniformMatrix2fvProc> fUniformMatrix2fv;
GrGLFunction<GrGLUniformMatrix3fvProc> fUniformMatrix3fv;
GrGLFunction<GrGLUniformMatrix4fvProc> fUniformMatrix4fv;
GrGLFunction<GrGLUnmapBufferProc> fUnmapBuffer;
GrGLFunction<GrGLUnmapBufferSubDataProc> fUnmapBufferSubData;
GrGLFunction<GrGLUnmapTexSubImage2DProc> fUnmapTexSubImage2D;
GrGLFunction<GrGLUseProgramProc> fUseProgram;
GrGLFunction<GrGLVertexAttrib1fProc> fVertexAttrib1f;
GrGLFunction<GrGLVertexAttrib2fvProc> fVertexAttrib2fv;
GrGLFunction<GrGLVertexAttrib3fvProc> fVertexAttrib3fv;
GrGLFunction<GrGLVertexAttrib4fvProc> fVertexAttrib4fv;
GrGLFunction<GrGLVertexAttribDivisorProc> fVertexAttribDivisor;
GrGLFunction<GrGLVertexAttribPointerProc> fVertexAttribPointer;
GrGLFunction<GrGLViewportProc> fViewport;
/* GL_NV_path_rendering */
GLPtr<GrGLMatrixLoadfProc> fMatrixLoadf;
GLPtr<GrGLMatrixLoadIdentityProc> fMatrixLoadIdentity;
GLPtr<GrGLGetProgramResourceLocationProc> fGetProgramResourceLocation;
GLPtr<GrGLPathCommandsProc> fPathCommands;
GLPtr<GrGLPathParameteriProc> fPathParameteri;
GLPtr<GrGLPathParameterfProc> fPathParameterf;
GLPtr<GrGLGenPathsProc> fGenPaths;
GLPtr<GrGLDeletePathsProc> fDeletePaths;
GLPtr<GrGLIsPathProc> fIsPath;
GLPtr<GrGLPathStencilFuncProc> fPathStencilFunc;
GLPtr<GrGLStencilFillPathProc> fStencilFillPath;
GLPtr<GrGLStencilStrokePathProc> fStencilStrokePath;
GLPtr<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced;
GLPtr<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced;
GLPtr<GrGLCoverFillPathProc> fCoverFillPath;
GLPtr<GrGLCoverStrokePathProc> fCoverStrokePath;
GLPtr<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced;
GLPtr<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced;
GrGLFunction<GrGLMatrixLoadfProc> fMatrixLoadf;
GrGLFunction<GrGLMatrixLoadIdentityProc> fMatrixLoadIdentity;
GrGLFunction<GrGLGetProgramResourceLocationProc> fGetProgramResourceLocation;
GrGLFunction<GrGLPathCommandsProc> fPathCommands;
GrGLFunction<GrGLPathParameteriProc> fPathParameteri;
GrGLFunction<GrGLPathParameterfProc> fPathParameterf;
GrGLFunction<GrGLGenPathsProc> fGenPaths;
GrGLFunction<GrGLDeletePathsProc> fDeletePaths;
GrGLFunction<GrGLIsPathProc> fIsPath;
GrGLFunction<GrGLPathStencilFuncProc> fPathStencilFunc;
GrGLFunction<GrGLStencilFillPathProc> fStencilFillPath;
GrGLFunction<GrGLStencilStrokePathProc> fStencilStrokePath;
GrGLFunction<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced;
GrGLFunction<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced;
GrGLFunction<GrGLCoverFillPathProc> fCoverFillPath;
GrGLFunction<GrGLCoverStrokePathProc> fCoverStrokePath;
GrGLFunction<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced;
GrGLFunction<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced;
// NV_path_rendering v1.2
GLPtr<GrGLStencilThenCoverFillPathProc> fStencilThenCoverFillPath;
GLPtr<GrGLStencilThenCoverStrokePathProc> fStencilThenCoverStrokePath;
GLPtr<GrGLStencilThenCoverFillPathInstancedProc> fStencilThenCoverFillPathInstanced;
GLPtr<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced;
GrGLFunction<GrGLStencilThenCoverFillPathProc> fStencilThenCoverFillPath;
GrGLFunction<GrGLStencilThenCoverStrokePathProc> fStencilThenCoverStrokePath;
GrGLFunction<GrGLStencilThenCoverFillPathInstancedProc> fStencilThenCoverFillPathInstanced;
GrGLFunction<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced;
// NV_path_rendering v1.3
GLPtr<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen;
GrGLFunction<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen;
// CHROMIUM_path_rendering
GLPtr<GrGLBindFragmentInputLocationProc> fBindFragmentInputLocation;
GrGLFunction<GrGLBindFragmentInputLocationProc> fBindFragmentInputLocation;
/* NV_framebuffer_mixed_samples */
GLPtr<GrGLCoverageModulationProc> fCoverageModulation;
GrGLFunction<GrGLCoverageModulationProc> fCoverageModulation;
/* EXT_multi_draw_indirect */
GLPtr<GrGLMultiDrawArraysIndirectProc> fMultiDrawArraysIndirect;
GLPtr<GrGLMultiDrawElementsIndirectProc> fMultiDrawElementsIndirect;
GrGLFunction<GrGLMultiDrawArraysIndirectProc> fMultiDrawArraysIndirect;
GrGLFunction<GrGLMultiDrawElementsIndirectProc> fMultiDrawElementsIndirect;
/* NV_bindless_texture */
// We use the NVIDIA verson for now because it does not require dynamically uniform handles.
// We may switch the the ARB version and/or omit methods in the future.
GLPtr<GrGLGetTextureHandleProc> fGetTextureHandle;
GLPtr<GrGLGetTextureSamplerHandleProc> fGetTextureSamplerHandle;
GLPtr<GrGLMakeTextureHandleResidentProc> fMakeTextureHandleResident;
GLPtr<GrGLMakeTextureHandleNonResidentProc> fMakeTextureHandleNonResident;
GLPtr<GrGLGetImageHandleProc> fGetImageHandle;
GLPtr<GrGLMakeImageHandleResidentProc> fMakeImageHandleResident;
GLPtr<GrGLMakeImageHandleNonResidentProc> fMakeImageHandleNonResident;
GLPtr<GrGLIsTextureHandleResidentProc> fIsTextureHandleResident;
GLPtr<GrGLIsImageHandleResidentProc> fIsImageHandleResident;
GLPtr<GrGLUniformHandleui64Proc> fUniformHandleui64;
GLPtr<GrGLUniformHandleui64vProc> fUniformHandleui64v;
GLPtr<GrGLProgramUniformHandleui64Proc> fProgramUniformHandleui64;
GLPtr<GrGLProgramUniformHandleui64vProc> fProgramUniformHandleui64v;
GrGLFunction<GrGLGetTextureHandleProc> fGetTextureHandle;
GrGLFunction<GrGLGetTextureSamplerHandleProc> fGetTextureSamplerHandle;
GrGLFunction<GrGLMakeTextureHandleResidentProc> fMakeTextureHandleResident;
GrGLFunction<GrGLMakeTextureHandleNonResidentProc> fMakeTextureHandleNonResident;
GrGLFunction<GrGLGetImageHandleProc> fGetImageHandle;
GrGLFunction<GrGLMakeImageHandleResidentProc> fMakeImageHandleResident;
GrGLFunction<GrGLMakeImageHandleNonResidentProc> fMakeImageHandleNonResident;
GrGLFunction<GrGLIsTextureHandleResidentProc> fIsTextureHandleResident;
GrGLFunction<GrGLIsImageHandleResidentProc> fIsImageHandleResident;
GrGLFunction<GrGLUniformHandleui64Proc> fUniformHandleui64;
GrGLFunction<GrGLUniformHandleui64vProc> fUniformHandleui64v;
GrGLFunction<GrGLProgramUniformHandleui64Proc> fProgramUniformHandleui64;
GrGLFunction<GrGLProgramUniformHandleui64vProc> fProgramUniformHandleui64v;
/* EXT_direct_state_access */
// We use the EXT verson because it is more expansive and interacts with more extensions
// than the ARB or core (4.5) versions. We may switch and/or omit methods in the future.
GLPtr<GrGLTextureParameteriProc> fTextureParameteri;
GLPtr<GrGLTextureParameterivProc> fTextureParameteriv;
GLPtr<GrGLTextureParameterfProc> fTextureParameterf;
GLPtr<GrGLTextureParameterfvProc> fTextureParameterfv;
GLPtr<GrGLTextureImage1DProc> fTextureImage1D;
GLPtr<GrGLTextureImage2DProc> fTextureImage2D;
GLPtr<GrGLTextureSubImage1DProc> fTextureSubImage1D;
GLPtr<GrGLTextureSubImage2DProc> fTextureSubImage2D;
GLPtr<GrGLCopyTextureImage1DProc> fCopyTextureImage1D;
GLPtr<GrGLCopyTextureImage2DProc> fCopyTextureImage2D;
GLPtr<GrGLCopyTextureSubImage1DProc> fCopyTextureSubImage1D;
GLPtr<GrGLCopyTextureSubImage2DProc> fCopyTextureSubImage2D;
GLPtr<GrGLGetTextureImageProc> fGetTextureImage;
GLPtr<GrGLGetTextureParameterfvProc> fGetTextureParameterfv;
GLPtr<GrGLGetTextureParameterivProc> fGetTextureParameteriv;
GLPtr<GrGLGetTextureLevelParameterfvProc> fGetTextureLevelParameterfv;
GLPtr<GrGLGetTextureLevelParameterivProc> fGetTextureLevelParameteriv;
GrGLFunction<GrGLTextureParameteriProc> fTextureParameteri;
GrGLFunction<GrGLTextureParameterivProc> fTextureParameteriv;
GrGLFunction<GrGLTextureParameterfProc> fTextureParameterf;
GrGLFunction<GrGLTextureParameterfvProc> fTextureParameterfv;
GrGLFunction<GrGLTextureImage1DProc> fTextureImage1D;
GrGLFunction<GrGLTextureImage2DProc> fTextureImage2D;
GrGLFunction<GrGLTextureSubImage1DProc> fTextureSubImage1D;
GrGLFunction<GrGLTextureSubImage2DProc> fTextureSubImage2D;
GrGLFunction<GrGLCopyTextureImage1DProc> fCopyTextureImage1D;
GrGLFunction<GrGLCopyTextureImage2DProc> fCopyTextureImage2D;
GrGLFunction<GrGLCopyTextureSubImage1DProc> fCopyTextureSubImage1D;
GrGLFunction<GrGLCopyTextureSubImage2DProc> fCopyTextureSubImage2D;
GrGLFunction<GrGLGetTextureImageProc> fGetTextureImage;
GrGLFunction<GrGLGetTextureParameterfvProc> fGetTextureParameterfv;
GrGLFunction<GrGLGetTextureParameterivProc> fGetTextureParameteriv;
GrGLFunction<GrGLGetTextureLevelParameterfvProc> fGetTextureLevelParameterfv;
GrGLFunction<GrGLGetTextureLevelParameterivProc> fGetTextureLevelParameteriv;
// OpenGL 1.2
GLPtr<GrGLTextureImage3DProc> fTextureImage3D;
GLPtr<GrGLTextureSubImage3DProc> fTextureSubImage3D;
GLPtr<GrGLCopyTextureSubImage3DProc> fCopyTextureSubImage3D;
GLPtr<GrGLCompressedTextureImage3DProc> fCompressedTextureImage3D;
GLPtr<GrGLCompressedTextureImage2DProc> fCompressedTextureImage2D;
GLPtr<GrGLCompressedTextureImage1DProc> fCompressedTextureImage1D;
GLPtr<GrGLCompressedTextureSubImage3DProc> fCompressedTextureSubImage3D;
GLPtr<GrGLCompressedTextureSubImage2DProc> fCompressedTextureSubImage2D;
GLPtr<GrGLCompressedTextureSubImage1DProc> fCompressedTextureSubImage1D;
GLPtr<GrGLGetCompressedTextureImageProc> fGetCompressedTextureImage;
GrGLFunction<GrGLTextureImage3DProc> fTextureImage3D;
GrGLFunction<GrGLTextureSubImage3DProc> fTextureSubImage3D;
GrGLFunction<GrGLCopyTextureSubImage3DProc> fCopyTextureSubImage3D;
GrGLFunction<GrGLCompressedTextureImage3DProc> fCompressedTextureImage3D;
GrGLFunction<GrGLCompressedTextureImage2DProc> fCompressedTextureImage2D;
GrGLFunction<GrGLCompressedTextureImage1DProc> fCompressedTextureImage1D;
GrGLFunction<GrGLCompressedTextureSubImage3DProc> fCompressedTextureSubImage3D;
GrGLFunction<GrGLCompressedTextureSubImage2DProc> fCompressedTextureSubImage2D;
GrGLFunction<GrGLCompressedTextureSubImage1DProc> fCompressedTextureSubImage1D;
GrGLFunction<GrGLGetCompressedTextureImageProc> fGetCompressedTextureImage;
// OpenGL 1.5
GLPtr<GrGLNamedBufferDataProc> fNamedBufferData;
GLPtr<GrGLNamedBufferSubDataProc> fNamedBufferSubData;
GLPtr<GrGLMapNamedBufferProc> fMapNamedBuffer;
GLPtr<GrGLUnmapNamedBufferProc> fUnmapNamedBuffer;
GLPtr<GrGLGetNamedBufferParameterivProc> fGetNamedBufferParameteriv;
GLPtr<GrGLGetNamedBufferPointervProc> fGetNamedBufferPointerv;
GLPtr<GrGLGetNamedBufferSubDataProc> fGetNamedBufferSubData;
GrGLFunction<GrGLNamedBufferDataProc> fNamedBufferData;
GrGLFunction<GrGLNamedBufferSubDataProc> fNamedBufferSubData;
GrGLFunction<GrGLMapNamedBufferProc> fMapNamedBuffer;
GrGLFunction<GrGLUnmapNamedBufferProc> fUnmapNamedBuffer;
GrGLFunction<GrGLGetNamedBufferParameterivProc> fGetNamedBufferParameteriv;
GrGLFunction<GrGLGetNamedBufferPointervProc> fGetNamedBufferPointerv;
GrGLFunction<GrGLGetNamedBufferSubDataProc> fGetNamedBufferSubData;
// OpenGL 2.0
GLPtr<GrGLProgramUniform1fProc> fProgramUniform1f;
GLPtr<GrGLProgramUniform2fProc> fProgramUniform2f;
GLPtr<GrGLProgramUniform3fProc> fProgramUniform3f;
GLPtr<GrGLProgramUniform4fProc> fProgramUniform4f;
GLPtr<GrGLProgramUniform1iProc> fProgramUniform1i;
GLPtr<GrGLProgramUniform2iProc> fProgramUniform2i;
GLPtr<GrGLProgramUniform3iProc> fProgramUniform3i;
GLPtr<GrGLProgramUniform4iProc> fProgramUniform4i;
GLPtr<GrGLProgramUniform1fvProc> fProgramUniform1fv;
GLPtr<GrGLProgramUniform2fvProc> fProgramUniform2fv;
GLPtr<GrGLProgramUniform3fvProc> fProgramUniform3fv;
GLPtr<GrGLProgramUniform4fvProc> fProgramUniform4fv;
GLPtr<GrGLProgramUniform1ivProc> fProgramUniform1iv;
GLPtr<GrGLProgramUniform2ivProc> fProgramUniform2iv;
GLPtr<GrGLProgramUniform3ivProc> fProgramUniform3iv;
GLPtr<GrGLProgramUniform4ivProc> fProgramUniform4iv;
GLPtr<GrGLProgramUniformMatrix2fvProc> fProgramUniformMatrix2fv;
GLPtr<GrGLProgramUniformMatrix3fvProc> fProgramUniformMatrix3fv;
GLPtr<GrGLProgramUniformMatrix4fvProc> fProgramUniformMatrix4fv;
GrGLFunction<GrGLProgramUniform1fProc> fProgramUniform1f;
GrGLFunction<GrGLProgramUniform2fProc> fProgramUniform2f;
GrGLFunction<GrGLProgramUniform3fProc> fProgramUniform3f;
GrGLFunction<GrGLProgramUniform4fProc> fProgramUniform4f;
GrGLFunction<GrGLProgramUniform1iProc> fProgramUniform1i;
GrGLFunction<GrGLProgramUniform2iProc> fProgramUniform2i;
GrGLFunction<GrGLProgramUniform3iProc> fProgramUniform3i;
GrGLFunction<GrGLProgramUniform4iProc> fProgramUniform4i;
GrGLFunction<GrGLProgramUniform1fvProc> fProgramUniform1fv;
GrGLFunction<GrGLProgramUniform2fvProc> fProgramUniform2fv;
GrGLFunction<GrGLProgramUniform3fvProc> fProgramUniform3fv;
GrGLFunction<GrGLProgramUniform4fvProc> fProgramUniform4fv;
GrGLFunction<GrGLProgramUniform1ivProc> fProgramUniform1iv;
GrGLFunction<GrGLProgramUniform2ivProc> fProgramUniform2iv;
GrGLFunction<GrGLProgramUniform3ivProc> fProgramUniform3iv;
GrGLFunction<GrGLProgramUniform4ivProc> fProgramUniform4iv;
GrGLFunction<GrGLProgramUniformMatrix2fvProc> fProgramUniformMatrix2fv;
GrGLFunction<GrGLProgramUniformMatrix3fvProc> fProgramUniformMatrix3fv;
GrGLFunction<GrGLProgramUniformMatrix4fvProc> fProgramUniformMatrix4fv;
// OpenGL 2.1
GLPtr<GrGLProgramUniformMatrix2x3fvProc> fProgramUniformMatrix2x3fv;
GLPtr<GrGLProgramUniformMatrix3x2fvProc> fProgramUniformMatrix3x2fv;
GLPtr<GrGLProgramUniformMatrix2x4fvProc> fProgramUniformMatrix2x4fv;
GLPtr<GrGLProgramUniformMatrix4x2fvProc> fProgramUniformMatrix4x2fv;
GLPtr<GrGLProgramUniformMatrix3x4fvProc> fProgramUniformMatrix3x4fv;
GLPtr<GrGLProgramUniformMatrix4x3fvProc> fProgramUniformMatrix4x3fv;
GrGLFunction<GrGLProgramUniformMatrix2x3fvProc> fProgramUniformMatrix2x3fv;
GrGLFunction<GrGLProgramUniformMatrix3x2fvProc> fProgramUniformMatrix3x2fv;
GrGLFunction<GrGLProgramUniformMatrix2x4fvProc> fProgramUniformMatrix2x4fv;
GrGLFunction<GrGLProgramUniformMatrix4x2fvProc> fProgramUniformMatrix4x2fv;
GrGLFunction<GrGLProgramUniformMatrix3x4fvProc> fProgramUniformMatrix3x4fv;
GrGLFunction<GrGLProgramUniformMatrix4x3fvProc> fProgramUniformMatrix4x3fv;
// OpenGL 3.0
GLPtr<GrGLNamedRenderbufferStorageProc> fNamedRenderbufferStorage;
GLPtr<GrGLGetNamedRenderbufferParameterivProc> fGetNamedRenderbufferParameteriv;
GLPtr<GrGLNamedRenderbufferStorageMultisampleProc> fNamedRenderbufferStorageMultisample;
GLPtr<GrGLCheckNamedFramebufferStatusProc> fCheckNamedFramebufferStatus;
GLPtr<GrGLNamedFramebufferTexture1DProc> fNamedFramebufferTexture1D;
GLPtr<GrGLNamedFramebufferTexture2DProc> fNamedFramebufferTexture2D;
GLPtr<GrGLNamedFramebufferTexture3DProc> fNamedFramebufferTexture3D;
GLPtr<GrGLNamedFramebufferRenderbufferProc> fNamedFramebufferRenderbuffer;
GLPtr<GrGLGetNamedFramebufferAttachmentParameterivProc> fGetNamedFramebufferAttachmentParameteriv;
GLPtr<GrGLGenerateTextureMipmapProc> fGenerateTextureMipmap;
GLPtr<GrGLFramebufferDrawBufferProc> fFramebufferDrawBuffer;
GLPtr<GrGLFramebufferDrawBuffersProc> fFramebufferDrawBuffers;
GLPtr<GrGLFramebufferReadBufferProc> fFramebufferReadBuffer;
GLPtr<GrGLGetFramebufferParameterivProc> fGetFramebufferParameteriv;
GLPtr<GrGLNamedCopyBufferSubDataProc> fNamedCopyBufferSubData;
GLPtr<GrGLVertexArrayVertexOffsetProc> fVertexArrayVertexOffset;
GLPtr<GrGLVertexArrayColorOffsetProc> fVertexArrayColorOffset;
GLPtr<GrGLVertexArrayEdgeFlagOffsetProc> fVertexArrayEdgeFlagOffset;
GLPtr<GrGLVertexArrayIndexOffsetProc> fVertexArrayIndexOffset;
GLPtr<GrGLVertexArrayNormalOffsetProc> fVertexArrayNormalOffset;
GLPtr<GrGLVertexArrayTexCoordOffsetProc> fVertexArrayTexCoordOffset;
GLPtr<GrGLVertexArrayMultiTexCoordOffsetProc> fVertexArrayMultiTexCoordOffset;
GLPtr<GrGLVertexArrayFogCoordOffsetProc> fVertexArrayFogCoordOffset;
GLPtr<GrGLVertexArraySecondaryColorOffsetProc> fVertexArraySecondaryColorOffset;
GLPtr<GrGLVertexArrayVertexAttribOffsetProc> fVertexArrayVertexAttribOffset;
GLPtr<GrGLVertexArrayVertexAttribIOffsetProc> fVertexArrayVertexAttribIOffset;
GLPtr<GrGLEnableVertexArrayProc> fEnableVertexArray;
GLPtr<GrGLDisableVertexArrayProc> fDisableVertexArray;
GLPtr<GrGLEnableVertexArrayAttribProc> fEnableVertexArrayAttrib;
GLPtr<GrGLDisableVertexArrayAttribProc> fDisableVertexArrayAttrib;
GLPtr<GrGLGetVertexArrayIntegervProc> fGetVertexArrayIntegerv;
GLPtr<GrGLGetVertexArrayPointervProc> fGetVertexArrayPointerv;
GLPtr<GrGLGetVertexArrayIntegeri_vProc> fGetVertexArrayIntegeri_v;
GLPtr<GrGLGetVertexArrayPointeri_vProc> fGetVertexArrayPointeri_v;
GLPtr<GrGLMapNamedBufferRangeProc> fMapNamedBufferRange;
GLPtr<GrGLFlushMappedNamedBufferRangeProc> fFlushMappedNamedBufferRange;
GrGLFunction<GrGLNamedRenderbufferStorageProc> fNamedRenderbufferStorage;
GrGLFunction<GrGLGetNamedRenderbufferParameterivProc> fGetNamedRenderbufferParameteriv;
GrGLFunction<GrGLNamedRenderbufferStorageMultisampleProc> fNamedRenderbufferStorageMultisample;
GrGLFunction<GrGLCheckNamedFramebufferStatusProc> fCheckNamedFramebufferStatus;
GrGLFunction<GrGLNamedFramebufferTexture1DProc> fNamedFramebufferTexture1D;
GrGLFunction<GrGLNamedFramebufferTexture2DProc> fNamedFramebufferTexture2D;
GrGLFunction<GrGLNamedFramebufferTexture3DProc> fNamedFramebufferTexture3D;
GrGLFunction<GrGLNamedFramebufferRenderbufferProc> fNamedFramebufferRenderbuffer;
GrGLFunction<GrGLGetNamedFramebufferAttachmentParameterivProc> fGetNamedFramebufferAttachmentParameteriv;
GrGLFunction<GrGLGenerateTextureMipmapProc> fGenerateTextureMipmap;
GrGLFunction<GrGLFramebufferDrawBufferProc> fFramebufferDrawBuffer;
GrGLFunction<GrGLFramebufferDrawBuffersProc> fFramebufferDrawBuffers;
GrGLFunction<GrGLFramebufferReadBufferProc> fFramebufferReadBuffer;
GrGLFunction<GrGLGetFramebufferParameterivProc> fGetFramebufferParameteriv;
GrGLFunction<GrGLNamedCopyBufferSubDataProc> fNamedCopyBufferSubData;
GrGLFunction<GrGLVertexArrayVertexOffsetProc> fVertexArrayVertexOffset;
GrGLFunction<GrGLVertexArrayColorOffsetProc> fVertexArrayColorOffset;
GrGLFunction<GrGLVertexArrayEdgeFlagOffsetProc> fVertexArrayEdgeFlagOffset;
GrGLFunction<GrGLVertexArrayIndexOffsetProc> fVertexArrayIndexOffset;
GrGLFunction<GrGLVertexArrayNormalOffsetProc> fVertexArrayNormalOffset;
GrGLFunction<GrGLVertexArrayTexCoordOffsetProc> fVertexArrayTexCoordOffset;
GrGLFunction<GrGLVertexArrayMultiTexCoordOffsetProc> fVertexArrayMultiTexCoordOffset;
GrGLFunction<GrGLVertexArrayFogCoordOffsetProc> fVertexArrayFogCoordOffset;
GrGLFunction<GrGLVertexArraySecondaryColorOffsetProc> fVertexArraySecondaryColorOffset;
GrGLFunction<GrGLVertexArrayVertexAttribOffsetProc> fVertexArrayVertexAttribOffset;
GrGLFunction<GrGLVertexArrayVertexAttribIOffsetProc> fVertexArrayVertexAttribIOffset;
GrGLFunction<GrGLEnableVertexArrayProc> fEnableVertexArray;
GrGLFunction<GrGLDisableVertexArrayProc> fDisableVertexArray;
GrGLFunction<GrGLEnableVertexArrayAttribProc> fEnableVertexArrayAttrib;
GrGLFunction<GrGLDisableVertexArrayAttribProc> fDisableVertexArrayAttrib;
GrGLFunction<GrGLGetVertexArrayIntegervProc> fGetVertexArrayIntegerv;
GrGLFunction<GrGLGetVertexArrayPointervProc> fGetVertexArrayPointerv;
GrGLFunction<GrGLGetVertexArrayIntegeri_vProc> fGetVertexArrayIntegeri_v;
GrGLFunction<GrGLGetVertexArrayPointeri_vProc> fGetVertexArrayPointeri_v;
GrGLFunction<GrGLMapNamedBufferRangeProc> fMapNamedBufferRange;
GrGLFunction<GrGLFlushMappedNamedBufferRangeProc> fFlushMappedNamedBufferRange;
/* KHR_debug */
GLPtr<GrGLDebugMessageControlProc> fDebugMessageControl;
GLPtr<GrGLDebugMessageInsertProc> fDebugMessageInsert;
GLPtr<GrGLDebugMessageCallbackProc> fDebugMessageCallback;
GLPtr<GrGLGetDebugMessageLogProc> fGetDebugMessageLog;
GLPtr<GrGLPushDebugGroupProc> fPushDebugGroup;
GLPtr<GrGLPopDebugGroupProc> fPopDebugGroup;
GLPtr<GrGLObjectLabelProc> fObjectLabel;
GrGLFunction<GrGLDebugMessageControlProc> fDebugMessageControl;
GrGLFunction<GrGLDebugMessageInsertProc> fDebugMessageInsert;
GrGLFunction<GrGLDebugMessageCallbackProc> fDebugMessageCallback;
GrGLFunction<GrGLGetDebugMessageLogProc> fGetDebugMessageLog;
GrGLFunction<GrGLPushDebugGroupProc> fPushDebugGroup;
GrGLFunction<GrGLPopDebugGroupProc> fPopDebugGroup;
GrGLFunction<GrGLObjectLabelProc> fObjectLabel;
/* EGL functions */
GLPtr<GrEGLCreateImageProc> fEGLCreateImage;
GLPtr<GrEGLDestroyImageProc> fEGLDestroyImage;
GrGLFunction<GrEGLCreateImageProc> fEGLCreateImage;
GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage;
} fFunctions;
// Per-GL func callback

View File

@ -664,11 +664,11 @@ bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG
// additions are detected by checking the existence of the function.
// We also use *Then* functions that not all drivers might have. Check
// them for consistency.
if (nullptr == gli->fFunctions.fStencilThenCoverFillPath ||
nullptr == gli->fFunctions.fStencilThenCoverStrokePath ||
nullptr == gli->fFunctions.fStencilThenCoverFillPathInstanced ||
nullptr == gli->fFunctions.fStencilThenCoverStrokePathInstanced ||
nullptr == gli->fFunctions.fProgramPathFragmentInputGen) {
if (!gli->fFunctions.fStencilThenCoverFillPath ||
!gli->fFunctions.fStencilThenCoverStrokePath ||
!gli->fFunctions.fStencilThenCoverFillPathInstanced ||
!gli->fFunctions.fStencilThenCoverStrokePathInstanced ||
!gli->fFunctions.fProgramPathFragmentInputGen) {
return false;
}
return true;

View File

@ -62,10 +62,10 @@ static void eat_space_sep_strings(SkTArray<SkString>* out, const char in[]) {
}
bool GrGLExtensions::init(GrGLStandard standard,
GrGLGetStringProc getString,
GrGLGetStringiProc getStringi,
GrGLGetIntegervProc getIntegerv,
GrEGLQueryStringProc queryString,
GrGLFunction<GrGLGetStringProc> getString,
GrGLFunction<GrGLGetStringiProc> getStringi,
GrGLFunction<GrGLGetIntegervProc> getIntegerv,
GrGLFunction<GrEGLQueryStringProc> queryString,
GrEGLDisplay eglDisplay) {
fInitialized = false;
fStrings->reset();