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