Cleanup GrGLInterface after Chromium changes

Depends on landing https://codereview.chromium.org/143263014

R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13630 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-02-28 20:28:50 +00:00
parent ad4bcb71c9
commit f535561b3b
5 changed files with 196 additions and 592 deletions

View File

@ -23,11 +23,6 @@ enum GrGLStandard {
kGLES_GrGLStandard,
};
// Temporary aliases until Chromium can be updated.
typedef GrGLStandard GrGLBinding;
static const GrGLStandard kES2_GrGLBinding = kGLES_GrGLStandard;
static const GrGLStandard kDesktop_GrGLBinding = kGL_GrGLStandard;
///////////////////////////////////////////////////////////////////////////////
/**

View File

@ -138,18 +138,7 @@ public:
GrGLExtensions fExtensions;
// This wrapper and const hackery is necessary because the factories in Chromium do not yet
// initialize fExtensions.
bool hasExtension(const char ext[]) const {
if (!fExtensions.isInitialized()) {
GrGLExtensions* extensions = const_cast<GrGLExtensions*>(&fExtensions);
if (!extensions->init(fStandard, fFunctions.fGetString,
fFunctions.fGetStringi, fFunctions.fGetIntegerv)) {
return false;
}
}
return fExtensions.has(ext);
}
bool hasExtension(const char ext[]) const { return fExtensions.has(ext); }
/**
* The function pointers are in a struct so that we can have a compiler generated assignment
@ -369,199 +358,11 @@ public:
GLPtr<GrGLPointAlongPathProc> fPointAlongPath;
} fFunctions;
// Temporary workaround aliases to keep Chromium GrGLInterface factories compiling until they
// assign the members of fFunctions.
GLPtrAlias<GrGLActiveTextureProc> fActiveTexture;
GLPtrAlias<GrGLAttachShaderProc> fAttachShader;
GLPtrAlias<GrGLBeginQueryProc> fBeginQuery;
GLPtrAlias<GrGLBindAttribLocationProc> fBindAttribLocation;
GLPtrAlias<GrGLBindBufferProc> fBindBuffer;
GLPtrAlias<GrGLBindFragDataLocationProc> fBindFragDataLocation;
GLPtrAlias<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed;
GLPtrAlias<GrGLBindFramebufferProc> fBindFramebuffer;
GLPtrAlias<GrGLBindRenderbufferProc> fBindRenderbuffer;
GLPtrAlias<GrGLBindTextureProc> fBindTexture;
GLPtrAlias<GrGLBindVertexArrayProc> fBindVertexArray;
GLPtrAlias<GrGLBlendColorProc> fBlendColor;
GLPtrAlias<GrGLBlendFuncProc> fBlendFunc;
GLPtrAlias<GrGLBlitFramebufferProc> fBlitFramebuffer;
GLPtrAlias<GrGLBufferDataProc> fBufferData;
GLPtrAlias<GrGLBufferSubDataProc> fBufferSubData;
GLPtrAlias<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus;
GLPtrAlias<GrGLClearProc> fClear;
GLPtrAlias<GrGLClearColorProc> fClearColor;
GLPtrAlias<GrGLClearStencilProc> fClearStencil;
GLPtrAlias<GrGLColorMaskProc> fColorMask;
GLPtrAlias<GrGLCompileShaderProc> fCompileShader;
GLPtrAlias<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
GLPtrAlias<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D;
GLPtrAlias<GrGLCreateProgramProc> fCreateProgram;
GLPtrAlias<GrGLCreateShaderProc> fCreateShader;
GLPtrAlias<GrGLCullFaceProc> fCullFace;
GLPtrAlias<GrGLDeleteBuffersProc> fDeleteBuffers;
GLPtrAlias<GrGLDeleteFramebuffersProc> fDeleteFramebuffers;
GLPtrAlias<GrGLDeleteProgramProc> fDeleteProgram;
GLPtrAlias<GrGLDeleteQueriesProc> fDeleteQueries;
GLPtrAlias<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers;
GLPtrAlias<GrGLDeleteShaderProc> fDeleteShader;
GLPtrAlias<GrGLDeleteTexturesProc> fDeleteTextures;
GLPtrAlias<GrGLDeleteVertexArraysProc> fDeleteVertexArrays;
GLPtrAlias<GrGLDepthMaskProc> fDepthMask;
GLPtrAlias<GrGLDisableProc> fDisable;
GLPtrAlias<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray;
GLPtrAlias<GrGLDrawArraysProc> fDrawArrays;
GLPtrAlias<GrGLDrawBufferProc> fDrawBuffer;
GLPtrAlias<GrGLDrawBuffersProc> fDrawBuffers;
GLPtrAlias<GrGLDrawElementsProc> fDrawElements;
GLPtrAlias<GrGLEnableProc> fEnable;
GLPtrAlias<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray;
GLPtrAlias<GrGLEndQueryProc> fEndQuery;
GLPtrAlias<GrGLFinishProc> fFinish;
GLPtrAlias<GrGLFlushProc> fFlush;
GLPtrAlias<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
GLPtrAlias<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
GLPtrAlias<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;
GLPtrAlias<GrGLFrontFaceProc> fFrontFace;
GLPtrAlias<GrGLGenBuffersProc> fGenBuffers;
GLPtrAlias<GrGLGenFramebuffersProc> fGenFramebuffers;
GLPtrAlias<GrGLGenerateMipmapProc> fGenerateMipmap;
GLPtrAlias<GrGLGenQueriesProc> fGenQueries;
GLPtrAlias<GrGLGenRenderbuffersProc> fGenRenderbuffers;
GLPtrAlias<GrGLGenTexturesProc> fGenTextures;
GLPtrAlias<GrGLGenVertexArraysProc> fGenVertexArrays;
GLPtrAlias<GrGLGetBufferParameterivProc> fGetBufferParameteriv;
GLPtrAlias<GrGLGetErrorProc> fGetError;
GLPtrAlias<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv;
GLPtrAlias<GrGLGetIntegervProc> fGetIntegerv;
GLPtrAlias<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v;
GLPtrAlias<GrGLGetQueryObjectivProc> fGetQueryObjectiv;
GLPtrAlias<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v;
GLPtrAlias<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv;
GLPtrAlias<GrGLGetQueryivProc> fGetQueryiv;
GLPtrAlias<GrGLGetProgramInfoLogProc> fGetProgramInfoLog;
GLPtrAlias<GrGLGetProgramivProc> fGetProgramiv;
GLPtrAlias<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
GLPtrAlias<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
GLPtrAlias<GrGLGetShaderivProc> fGetShaderiv;
GLPtrAlias<GrGLGetStringProc> fGetString;
GLPtrAlias<GrGLGetStringiProc> fGetStringi;
GLPtrAlias<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
GLPtrAlias<GrGLGetUniformLocationProc> fGetUniformLocation;
GLPtrAlias<GrGLInsertEventMarkerProc> fInsertEventMarker;
GLPtrAlias<GrGLLineWidthProc> fLineWidth;
GLPtrAlias<GrGLLinkProgramProc> fLinkProgram;
GLPtrAlias<GrGLLoadIdentityProc> fLoadIdentity;
GLPtrAlias<GrGLLoadMatrixfProc> fLoadMatrixf;
GLPtrAlias<GrGLMapBufferProc> fMapBuffer;
GLPtrAlias<GrGLMatrixModeProc> fMatrixMode;
GLPtrAlias<GrGLPixelStoreiProc> fPixelStorei;
GLPtrAlias<GrGLPopGroupMarkerProc> fPopGroupMarker;
GLPtrAlias<GrGLPushGroupMarkerProc> fPushGroupMarker;
GLPtrAlias<GrGLQueryCounterProc> fQueryCounter;
GLPtrAlias<GrGLReadBufferProc> fReadBuffer;
GLPtrAlias<GrGLReadPixelsProc> fReadPixels;
GLPtrAlias<GrGLRenderbufferStorageProc> fRenderbufferStorage;
GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT;
GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE;
GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample;
GLPtrAlias<GrGLBindUniformLocation> fBindUniformLocation;
GLPtrAlias<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer;
GLPtrAlias<GrGLScissorProc> fScissor;
GLPtrAlias<GrGLShaderSourceProc> fShaderSource;
GLPtrAlias<GrGLStencilFuncProc> fStencilFunc;
GLPtrAlias<GrGLStencilFuncSeparateProc> fStencilFuncSeparate;
GLPtrAlias<GrGLStencilMaskProc> fStencilMask;
GLPtrAlias<GrGLStencilMaskSeparateProc> fStencilMaskSeparate;
GLPtrAlias<GrGLStencilOpProc> fStencilOp;
GLPtrAlias<GrGLStencilOpSeparateProc> fStencilOpSeparate;
GLPtrAlias<GrGLTexGenfvProc> fTexGenfv;
GLPtrAlias<GrGLTexGeniProc> fTexGeni;
GLPtrAlias<GrGLTexImage2DProc> fTexImage2D;
GLPtrAlias<GrGLTexParameteriProc> fTexParameteri;
GLPtrAlias<GrGLTexParameterivProc> fTexParameteriv;
GLPtrAlias<GrGLTexSubImage2DProc> fTexSubImage2D;
GLPtrAlias<GrGLTexStorage2DProc> fTexStorage2D;
GLPtrAlias<GrGLDiscardFramebufferProc> fDiscardFramebuffer;
GLPtrAlias<GrGLUniform1fProc> fUniform1f;
GLPtrAlias<GrGLUniform1iProc> fUniform1i;
GLPtrAlias<GrGLUniform1fvProc> fUniform1fv;
GLPtrAlias<GrGLUniform1ivProc> fUniform1iv;
GLPtrAlias<GrGLUniform2fProc> fUniform2f;
GLPtrAlias<GrGLUniform2iProc> fUniform2i;
GLPtrAlias<GrGLUniform2fvProc> fUniform2fv;
GLPtrAlias<GrGLUniform2ivProc> fUniform2iv;
GLPtrAlias<GrGLUniform3fProc> fUniform3f;
GLPtrAlias<GrGLUniform3iProc> fUniform3i;
GLPtrAlias<GrGLUniform3fvProc> fUniform3fv;
GLPtrAlias<GrGLUniform3ivProc> fUniform3iv;
GLPtrAlias<GrGLUniform4fProc> fUniform4f;
GLPtrAlias<GrGLUniform4iProc> fUniform4i;
GLPtrAlias<GrGLUniform4fvProc> fUniform4fv;
GLPtrAlias<GrGLUniform4ivProc> fUniform4iv;
GLPtrAlias<GrGLUniformMatrix2fvProc> fUniformMatrix2fv;
GLPtrAlias<GrGLUniformMatrix3fvProc> fUniformMatrix3fv;
GLPtrAlias<GrGLUniformMatrix4fvProc> fUniformMatrix4fv;
GLPtrAlias<GrGLUnmapBufferProc> fUnmapBuffer;
GLPtrAlias<GrGLUseProgramProc> fUseProgram;
GLPtrAlias<GrGLVertexAttrib4fvProc> fVertexAttrib4fv;
GLPtrAlias<GrGLVertexAttribPointerProc> fVertexAttribPointer;
GLPtrAlias<GrGLViewportProc> fViewport;
GLPtrAlias<GrGLPathCommandsProc> fPathCommands;
GLPtrAlias<GrGLPathCoordsProc> fPathCoords;
GLPtrAlias<GrGLPathSubCommandsProc> fPathSubCommands;
GLPtrAlias<GrGLPathSubCoordsProc> fPathSubCoords;
GLPtrAlias<GrGLPathStringProc> fPathString;
GLPtrAlias<GrGLPathGlyphsProc> fPathGlyphs;
GLPtrAlias<GrGLPathGlyphRangeProc> fPathGlyphRange;
GLPtrAlias<GrGLWeightPathsProc> fWeightPaths;
GLPtrAlias<GrGLCopyPathProc> fCopyPath;
GLPtrAlias<GrGLInterpolatePathsProc> fInterpolatePaths;
GLPtrAlias<GrGLTransformPathProc> fTransformPath;
GLPtrAlias<GrGLPathParameterivProc> fPathParameteriv;
GLPtrAlias<GrGLPathParameteriProc> fPathParameteri;
GLPtrAlias<GrGLPathParameterfvProc> fPathParameterfv;
GLPtrAlias<GrGLPathParameterfProc> fPathParameterf;
GLPtrAlias<GrGLPathDashArrayProc> fPathDashArray;
GLPtrAlias<GrGLGenPathsProc> fGenPaths;
GLPtrAlias<GrGLDeletePathsProc> fDeletePaths;
GLPtrAlias<GrGLIsPathProc> fIsPath;
GLPtrAlias<GrGLPathStencilFuncProc> fPathStencilFunc;
GLPtrAlias<GrGLPathStencilDepthOffsetProc> fPathStencilDepthOffset;
GLPtrAlias<GrGLStencilFillPathProc> fStencilFillPath;
GLPtrAlias<GrGLStencilStrokePathProc> fStencilStrokePath;
GLPtrAlias<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced;
GLPtrAlias<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced;
GLPtrAlias<GrGLPathCoverDepthFuncProc> fPathCoverDepthFunc;
GLPtrAlias<GrGLPathColorGenProc> fPathColorGen;
GLPtrAlias<GrGLPathTexGenProc> fPathTexGen;
GLPtrAlias<GrGLPathFogGenProc> fPathFogGen;
GLPtrAlias<GrGLCoverFillPathProc> fCoverFillPath;
GLPtrAlias<GrGLCoverStrokePathProc> fCoverStrokePath;
GLPtrAlias<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced;
GLPtrAlias<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced;
GLPtrAlias<GrGLGetPathParameterivProc> fGetPathParameteriv;
GLPtrAlias<GrGLGetPathParameterfvProc> fGetPathParameterfv;
GLPtrAlias<GrGLGetPathCommandsProc> fGetPathCommands;
GLPtrAlias<GrGLGetPathCoordsProc> fGetPathCoords;
GLPtrAlias<GrGLGetPathDashArrayProc> fGetPathDashArray;
GLPtrAlias<GrGLGetPathMetricsProc> fGetPathMetrics;
GLPtrAlias<GrGLGetPathMetricRangeProc> fGetPathMetricRange;
GLPtrAlias<GrGLGetPathSpacingProc> fGetPathSpacing;
GLPtrAlias<GrGLGetPathColorGenivProc> fGetPathColorGeniv;
GLPtrAlias<GrGLGetPathColorGenfvProc> fGetPathColorGenfv;
GLPtrAlias<GrGLGetPathTexGenivProc> fGetPathTexGeniv;
GLPtrAlias<GrGLGetPathTexGenfvProc> fGetPathTexGenfv;
GLPtrAlias<GrGLIsPointInFillPathProc> fIsPointInFillPath;
GLPtrAlias<GrGLIsPointInStrokePathProc> fIsPointInStrokePath;
GLPtrAlias<GrGLGetPathLengthProc> fGetPathLength;
GLPtrAlias<GrGLPointAlongPathProc> fPointAlongPath;
// Per-GL func callback
#if GR_GL_PER_GL_FUNC_CALLBACK
GrGLInterfaceCallbackProc fCallback;
GrGLInterfaceCallbackData fCallbackData;
#endif
};
#endif

View File

@ -259,148 +259,144 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLGetBufferParameteriv(GrGLenum target, GrGLenu
} // end anonymous namespace
const GrGLInterface* GrGLCreateNullInterface() {
// The gl functions are not context-specific so we create one global
// interface
static SkAutoTUnref<GrGLInterface> glInterface;
if (!glInterface.get()) {
GrGLInterface* interface = SkNEW(GrGLInterface);
glInterface.reset(interface);
GrGLInterface* interface = SkNEW(GrGLInterface);
interface->fStandard = kGL_GrGLStandard;
interface->fStandard = kGL_GrGLStandard;
GrGLInterface::Functions* functions = &interface->fFunctions;
functions->fActiveTexture = nullGLActiveTexture;
functions->fAttachShader = nullGLAttachShader;
functions->fBeginQuery = nullGLBeginQuery;
functions->fBindAttribLocation = nullGLBindAttribLocation;
functions->fBindBuffer = nullGLBindBuffer;
functions->fBindFragDataLocation = noOpGLBindFragDataLocation;
functions->fBindTexture = nullGLBindTexture;
functions->fBindVertexArray = nullGLBindVertexArray;
functions->fBlendColor = noOpGLBlendColor;
functions->fBlendFunc = noOpGLBlendFunc;
functions->fBufferData = nullGLBufferData;
functions->fBufferSubData = noOpGLBufferSubData;
functions->fClear = noOpGLClear;
functions->fClearColor = noOpGLClearColor;
functions->fClearStencil = noOpGLClearStencil;
functions->fColorMask = noOpGLColorMask;
functions->fCompileShader = noOpGLCompileShader;
functions->fCompressedTexImage2D = noOpGLCompressedTexImage2D;
functions->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D;
functions->fCreateProgram = nullGLCreateProgram;
functions->fCreateShader = nullGLCreateShader;
functions->fCullFace = noOpGLCullFace;
functions->fDeleteBuffers = nullGLDeleteBuffers;
functions->fDeleteProgram = nullGLDelete;
functions->fDeleteQueries = noOpGLDeleteIds;
functions->fDeleteShader = nullGLDelete;
functions->fDeleteTextures = noOpGLDeleteIds;
functions->fDeleteVertexArrays = noOpGLDeleteIds;
functions->fDepthMask = noOpGLDepthMask;
functions->fDisable = noOpGLDisable;
functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray;
functions->fDrawArrays = noOpGLDrawArrays;
functions->fDrawBuffer = noOpGLDrawBuffer;
functions->fDrawBuffers = noOpGLDrawBuffers;
functions->fDrawElements = noOpGLDrawElements;
functions->fEnable = noOpGLEnable;
functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray;
functions->fEndQuery = noOpGLEndQuery;
functions->fFinish = noOpGLFinish;
functions->fFlush = noOpGLFlush;
functions->fFrontFace = noOpGLFrontFace;
functions->fGenBuffers = nullGLGenBuffers;
functions->fGenerateMipmap = nullGLGenerateMipmap;
functions->fGenQueries = noOpGLGenIds;
functions->fGenTextures = noOpGLGenIds;
functions->fGenVertexArrays = noOpGLGenIds;
functions->fGetBufferParameteriv = nullGLGetBufferParameteriv;
functions->fGetError = noOpGLGetError;
functions->fGetIntegerv = noOpGLGetIntegerv;
functions->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v;
functions->fGetQueryObjectiv = noOpGLGetQueryObjectiv;
functions->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v;
functions->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv;
functions->fGetQueryiv = noOpGLGetQueryiv;
functions->fGetProgramInfoLog = noOpGLGetInfoLog;
functions->fGetProgramiv = noOpGLGetShaderOrProgramiv;
functions->fGetShaderInfoLog = noOpGLGetInfoLog;
functions->fGetShaderiv = noOpGLGetShaderOrProgramiv;
functions->fGetString = noOpGLGetString;
functions->fGetStringi = noOpGLGetStringi;
functions->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv;
functions->fGetUniformLocation = noOpGLGetUniformLocation;
functions->fInsertEventMarker = noOpGLInsertEventMarker;
functions->fLoadIdentity = noOpGLLoadIdentity;
functions->fLoadMatrixf = noOpGLLoadMatrixf;
functions->fLineWidth = noOpGLLineWidth;
functions->fLinkProgram = noOpGLLinkProgram;
functions->fMatrixMode = noOpGLMatrixMode;
functions->fPixelStorei = nullGLPixelStorei;
functions->fPopGroupMarker = noOpGLPopGroupMarker;
functions->fPushGroupMarker = noOpGLPushGroupMarker;
functions->fQueryCounter = noOpGLQueryCounter;
functions->fReadBuffer = noOpGLReadBuffer;
functions->fReadPixels = nullGLReadPixels;
functions->fScissor = noOpGLScissor;
functions->fShaderSource = noOpGLShaderSource;
functions->fStencilFunc = noOpGLStencilFunc;
functions->fStencilFuncSeparate = noOpGLStencilFuncSeparate;
functions->fStencilMask = noOpGLStencilMask;
functions->fStencilMaskSeparate = noOpGLStencilMaskSeparate;
functions->fStencilOp = noOpGLStencilOp;
functions->fStencilOpSeparate = noOpGLStencilOpSeparate;
functions->fTexGenfv = noOpGLTexGenfv;
functions->fTexGeni = noOpGLTexGeni;
functions->fTexImage2D = noOpGLTexImage2D;
functions->fTexParameteri = noOpGLTexParameteri;
functions->fTexParameteriv = noOpGLTexParameteriv;
functions->fTexSubImage2D = noOpGLTexSubImage2D;
functions->fTexStorage2D = noOpGLTexStorage2D;
functions->fDiscardFramebuffer = noOpGLDiscardFramebuffer;
functions->fUniform1f = noOpGLUniform1f;
functions->fUniform1i = noOpGLUniform1i;
functions->fUniform1fv = noOpGLUniform1fv;
functions->fUniform1iv = noOpGLUniform1iv;
functions->fUniform2f = noOpGLUniform2f;
functions->fUniform2i = noOpGLUniform2i;
functions->fUniform2fv = noOpGLUniform2fv;
functions->fUniform2iv = noOpGLUniform2iv;
functions->fUniform3f = noOpGLUniform3f;
functions->fUniform3i = noOpGLUniform3i;
functions->fUniform3fv = noOpGLUniform3fv;
functions->fUniform3iv = noOpGLUniform3iv;
functions->fUniform4f = noOpGLUniform4f;
functions->fUniform4i = noOpGLUniform4i;
functions->fUniform4fv = noOpGLUniform4fv;
functions->fUniform4iv = noOpGLUniform4iv;
functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv;
functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv;
functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv;
functions->fUseProgram = nullGLUseProgram;
functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
functions->fVertexAttribPointer = noOpGLVertexAttribPointer;
functions->fViewport = nullGLViewport;
functions->fBindFramebuffer = nullGLBindFramebuffer;
functions->fBindRenderbuffer = nullGLBindRenderbuffer;
functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus;
functions->fDeleteFramebuffers = nullGLDeleteFramebuffers;
functions->fDeleteRenderbuffers = nullGLDeleteRenderbuffers;
functions->fFramebufferRenderbuffer = nullGLFramebufferRenderbuffer;
functions->fFramebufferTexture2D = nullGLFramebufferTexture2D;
functions->fGenFramebuffers = noOpGLGenIds;
functions->fGenRenderbuffers = noOpGLGenIds;
functions->fGetFramebufferAttachmentParameteriv = noOpGLGetFramebufferAttachmentParameteriv;
functions->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv;
functions->fRenderbufferStorage = noOpGLRenderbufferStorage;
functions->fRenderbufferStorageMultisample = noOpGLRenderbufferStorageMultisample;
functions->fBlitFramebuffer = noOpGLBlitFramebuffer;
functions->fResolveMultisampleFramebuffer = noOpGLResolveMultisampleFramebuffer;
functions->fMapBuffer = nullGLMapBuffer;
functions->fUnmapBuffer = nullGLUnmapBuffer;
functions->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationIndexed;
}
glInterface.get()->ref();
return glInterface.get();
GrGLInterface::Functions* functions = &interface->fFunctions;
functions->fActiveTexture = nullGLActiveTexture;
functions->fAttachShader = nullGLAttachShader;
functions->fBeginQuery = nullGLBeginQuery;
functions->fBindAttribLocation = nullGLBindAttribLocation;
functions->fBindBuffer = nullGLBindBuffer;
functions->fBindFragDataLocation = noOpGLBindFragDataLocation;
functions->fBindTexture = nullGLBindTexture;
functions->fBindVertexArray = nullGLBindVertexArray;
functions->fBlendColor = noOpGLBlendColor;
functions->fBlendFunc = noOpGLBlendFunc;
functions->fBufferData = nullGLBufferData;
functions->fBufferSubData = noOpGLBufferSubData;
functions->fClear = noOpGLClear;
functions->fClearColor = noOpGLClearColor;
functions->fClearStencil = noOpGLClearStencil;
functions->fColorMask = noOpGLColorMask;
functions->fCompileShader = noOpGLCompileShader;
functions->fCompressedTexImage2D = noOpGLCompressedTexImage2D;
functions->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D;
functions->fCreateProgram = nullGLCreateProgram;
functions->fCreateShader = nullGLCreateShader;
functions->fCullFace = noOpGLCullFace;
functions->fDeleteBuffers = nullGLDeleteBuffers;
functions->fDeleteProgram = nullGLDelete;
functions->fDeleteQueries = noOpGLDeleteIds;
functions->fDeleteShader = nullGLDelete;
functions->fDeleteTextures = noOpGLDeleteIds;
functions->fDeleteVertexArrays = noOpGLDeleteIds;
functions->fDepthMask = noOpGLDepthMask;
functions->fDisable = noOpGLDisable;
functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray;
functions->fDrawArrays = noOpGLDrawArrays;
functions->fDrawBuffer = noOpGLDrawBuffer;
functions->fDrawBuffers = noOpGLDrawBuffers;
functions->fDrawElements = noOpGLDrawElements;
functions->fEnable = noOpGLEnable;
functions->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray;
functions->fEndQuery = noOpGLEndQuery;
functions->fFinish = noOpGLFinish;
functions->fFlush = noOpGLFlush;
functions->fFrontFace = noOpGLFrontFace;
functions->fGenBuffers = nullGLGenBuffers;
functions->fGenerateMipmap = nullGLGenerateMipmap;
functions->fGenQueries = noOpGLGenIds;
functions->fGenTextures = noOpGLGenIds;
functions->fGenVertexArrays = noOpGLGenIds;
functions->fGetBufferParameteriv = nullGLGetBufferParameteriv;
functions->fGetError = noOpGLGetError;
functions->fGetIntegerv = noOpGLGetIntegerv;
functions->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v;
functions->fGetQueryObjectiv = noOpGLGetQueryObjectiv;
functions->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v;
functions->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv;
functions->fGetQueryiv = noOpGLGetQueryiv;
functions->fGetProgramInfoLog = noOpGLGetInfoLog;
functions->fGetProgramiv = noOpGLGetShaderOrProgramiv;
functions->fGetShaderInfoLog = noOpGLGetInfoLog;
functions->fGetShaderiv = noOpGLGetShaderOrProgramiv;
functions->fGetString = noOpGLGetString;
functions->fGetStringi = noOpGLGetStringi;
functions->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv;
functions->fGetUniformLocation = noOpGLGetUniformLocation;
functions->fInsertEventMarker = noOpGLInsertEventMarker;
functions->fLoadIdentity = noOpGLLoadIdentity;
functions->fLoadMatrixf = noOpGLLoadMatrixf;
functions->fLineWidth = noOpGLLineWidth;
functions->fLinkProgram = noOpGLLinkProgram;
functions->fMatrixMode = noOpGLMatrixMode;
functions->fPixelStorei = nullGLPixelStorei;
functions->fPopGroupMarker = noOpGLPopGroupMarker;
functions->fPushGroupMarker = noOpGLPushGroupMarker;
functions->fQueryCounter = noOpGLQueryCounter;
functions->fReadBuffer = noOpGLReadBuffer;
functions->fReadPixels = nullGLReadPixels;
functions->fScissor = noOpGLScissor;
functions->fShaderSource = noOpGLShaderSource;
functions->fStencilFunc = noOpGLStencilFunc;
functions->fStencilFuncSeparate = noOpGLStencilFuncSeparate;
functions->fStencilMask = noOpGLStencilMask;
functions->fStencilMaskSeparate = noOpGLStencilMaskSeparate;
functions->fStencilOp = noOpGLStencilOp;
functions->fStencilOpSeparate = noOpGLStencilOpSeparate;
functions->fTexGenfv = noOpGLTexGenfv;
functions->fTexGeni = noOpGLTexGeni;
functions->fTexImage2D = noOpGLTexImage2D;
functions->fTexParameteri = noOpGLTexParameteri;
functions->fTexParameteriv = noOpGLTexParameteriv;
functions->fTexSubImage2D = noOpGLTexSubImage2D;
functions->fTexStorage2D = noOpGLTexStorage2D;
functions->fDiscardFramebuffer = noOpGLDiscardFramebuffer;
functions->fUniform1f = noOpGLUniform1f;
functions->fUniform1i = noOpGLUniform1i;
functions->fUniform1fv = noOpGLUniform1fv;
functions->fUniform1iv = noOpGLUniform1iv;
functions->fUniform2f = noOpGLUniform2f;
functions->fUniform2i = noOpGLUniform2i;
functions->fUniform2fv = noOpGLUniform2fv;
functions->fUniform2iv = noOpGLUniform2iv;
functions->fUniform3f = noOpGLUniform3f;
functions->fUniform3i = noOpGLUniform3i;
functions->fUniform3fv = noOpGLUniform3fv;
functions->fUniform3iv = noOpGLUniform3iv;
functions->fUniform4f = noOpGLUniform4f;
functions->fUniform4i = noOpGLUniform4i;
functions->fUniform4fv = noOpGLUniform4fv;
functions->fUniform4iv = noOpGLUniform4iv;
functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv;
functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv;
functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv;
functions->fUseProgram = nullGLUseProgram;
functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
functions->fVertexAttribPointer = noOpGLVertexAttribPointer;
functions->fViewport = nullGLViewport;
functions->fBindFramebuffer = nullGLBindFramebuffer;
functions->fBindRenderbuffer = nullGLBindRenderbuffer;
functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus;
functions->fDeleteFramebuffers = nullGLDeleteFramebuffers;
functions->fDeleteRenderbuffers = nullGLDeleteRenderbuffers;
functions->fFramebufferRenderbuffer = nullGLFramebufferRenderbuffer;
functions->fFramebufferTexture2D = nullGLFramebufferTexture2D;
functions->fGenFramebuffers = noOpGLGenIds;
functions->fGenRenderbuffers = noOpGLGenIds;
functions->fGetFramebufferAttachmentParameteriv = noOpGLGetFramebufferAttachmentParameteriv;
functions->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv;
functions->fRenderbufferStorage = noOpGLRenderbufferStorage;
functions->fRenderbufferStorageMultisample = noOpGLRenderbufferStorageMultisample;
functions->fBlitFramebuffer = noOpGLBlitFramebuffer;
functions->fResolveMultisampleFramebuffer = noOpGLResolveMultisampleFramebuffer;
functions->fMapBuffer = nullGLMapBuffer;
functions->fUnmapBuffer = nullGLUnmapBuffer;
functions->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationIndexed;
interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functions->fGetStringi,
functions->fGetIntegerv);
return interface;
}

View File

@ -28,9 +28,9 @@ const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interf
newInterface->fExtensions.add("GL_EXT_debug_marker");
}
newInterface->fInsertEventMarker = insertEventMarkerFn;
newInterface->fPushGroupMarker = pushGroupMarkerFn;
newInterface->fPopGroupMarker = popGroupMarkerFn;
newInterface->fFunctions.fInsertEventMarker = insertEventMarkerFn;
newInterface->fFunctions.fPushGroupMarker = pushGroupMarkerFn;
newInterface->fFunctions.fPopGroupMarker = popGroupMarkerFn;
return newInterface;
}
@ -40,245 +40,60 @@ const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
newInterface->fExtensions.remove("GL_NV_path_rendering");
newInterface->fPathCommands = NULL;
newInterface->fPathCoords = NULL;
newInterface->fPathSubCommands = NULL;
newInterface->fPathSubCoords = NULL;
newInterface->fPathString = NULL;
newInterface->fPathGlyphs = NULL;
newInterface->fPathGlyphRange = NULL;
newInterface->fWeightPaths = NULL;
newInterface->fCopyPath = NULL;
newInterface->fInterpolatePaths = NULL;
newInterface->fTransformPath = NULL;
newInterface->fPathParameteriv = NULL;
newInterface->fPathParameteri = NULL;
newInterface->fPathParameterfv = NULL;
newInterface->fPathParameterf = NULL;
newInterface->fPathDashArray = NULL;
newInterface->fGenPaths = NULL;
newInterface->fDeletePaths = NULL;
newInterface->fIsPath = NULL;
newInterface->fPathStencilFunc = NULL;
newInterface->fPathStencilDepthOffset = NULL;
newInterface->fStencilFillPath = NULL;
newInterface->fStencilStrokePath = NULL;
newInterface->fStencilFillPathInstanced = NULL;
newInterface->fStencilStrokePathInstanced = NULL;
newInterface->fPathCoverDepthFunc = NULL;
newInterface->fPathColorGen = NULL;
newInterface->fPathTexGen = NULL;
newInterface->fPathFogGen = NULL;
newInterface->fCoverFillPath = NULL;
newInterface->fCoverStrokePath = NULL;
newInterface->fCoverFillPathInstanced = NULL;
newInterface->fCoverStrokePathInstanced = NULL;
newInterface->fGetPathParameteriv = NULL;
newInterface->fGetPathParameterfv = NULL;
newInterface->fGetPathCommands = NULL;
newInterface->fGetPathCoords = NULL;
newInterface->fGetPathDashArray = NULL;
newInterface->fGetPathMetrics = NULL;
newInterface->fGetPathMetricRange = NULL;
newInterface->fGetPathSpacing = NULL;
newInterface->fGetPathColorGeniv = NULL;
newInterface->fGetPathColorGenfv = NULL;
newInterface->fGetPathTexGeniv = NULL;
newInterface->fGetPathTexGenfv = NULL;
newInterface->fIsPointInFillPath = NULL;
newInterface->fIsPointInStrokePath = NULL;
newInterface->fGetPathLength = NULL;
newInterface->fPointAlongPath = NULL;
newInterface->fFunctions.fPathCommands = NULL;
newInterface->fFunctions.fPathCoords = NULL;
newInterface->fFunctions.fPathSubCommands = NULL;
newInterface->fFunctions.fPathSubCoords = NULL;
newInterface->fFunctions.fPathString = NULL;
newInterface->fFunctions.fPathGlyphs = NULL;
newInterface->fFunctions.fPathGlyphRange = NULL;
newInterface->fFunctions.fWeightPaths = NULL;
newInterface->fFunctions.fCopyPath = NULL;
newInterface->fFunctions.fInterpolatePaths = NULL;
newInterface->fFunctions.fTransformPath = NULL;
newInterface->fFunctions.fPathParameteriv = NULL;
newInterface->fFunctions.fPathParameteri = NULL;
newInterface->fFunctions.fPathParameterfv = NULL;
newInterface->fFunctions.fPathParameterf = NULL;
newInterface->fFunctions.fPathDashArray = NULL;
newInterface->fFunctions.fGenPaths = NULL;
newInterface->fFunctions.fDeletePaths = NULL;
newInterface->fFunctions.fIsPath = NULL;
newInterface->fFunctions.fPathStencilFunc = NULL;
newInterface->fFunctions.fPathStencilDepthOffset = NULL;
newInterface->fFunctions.fStencilFillPath = NULL;
newInterface->fFunctions.fStencilStrokePath = NULL;
newInterface->fFunctions.fStencilFillPathInstanced = NULL;
newInterface->fFunctions.fStencilStrokePathInstanced = NULL;
newInterface->fFunctions.fPathCoverDepthFunc = NULL;
newInterface->fFunctions.fPathColorGen = NULL;
newInterface->fFunctions.fPathTexGen = NULL;
newInterface->fFunctions.fPathFogGen = NULL;
newInterface->fFunctions.fCoverFillPath = NULL;
newInterface->fFunctions.fCoverStrokePath = NULL;
newInterface->fFunctions.fCoverFillPathInstanced = NULL;
newInterface->fFunctions.fCoverStrokePathInstanced = NULL;
newInterface->fFunctions.fGetPathParameteriv = NULL;
newInterface->fFunctions.fGetPathParameterfv = NULL;
newInterface->fFunctions.fGetPathCommands = NULL;
newInterface->fFunctions.fGetPathCoords = NULL;
newInterface->fFunctions.fGetPathDashArray = NULL;
newInterface->fFunctions.fGetPathMetrics = NULL;
newInterface->fFunctions.fGetPathMetricRange = NULL;
newInterface->fFunctions.fGetPathSpacing = NULL;
newInterface->fFunctions.fGetPathColorGeniv = NULL;
newInterface->fFunctions.fGetPathColorGenfv = NULL;
newInterface->fFunctions.fGetPathTexGeniv = NULL;
newInterface->fFunctions.fGetPathTexGenfv = NULL;
newInterface->fFunctions.fIsPointInFillPath = NULL;
newInterface->fFunctions.fIsPointInStrokePath = NULL;
newInterface->fFunctions.fGetPathLength = NULL;
newInterface->fFunctions.fPointAlongPath = NULL;
return newInterface;
}
GrGLInterface::GrGLInterface()
// TODO: Remove this madness ASAP.
: fActiveTexture(&fFunctions.fActiveTexture)
, fAttachShader(&fFunctions.fAttachShader)
, fBeginQuery(&fFunctions.fBeginQuery)
, fBindAttribLocation(&fFunctions.fBindAttribLocation)
, fBindBuffer(&fFunctions.fBindBuffer)
, fBindFragDataLocation(&fFunctions.fBindFragDataLocation)
, fBindFragDataLocationIndexed(&fFunctions.fBindFragDataLocationIndexed)
, fBindFramebuffer(&fFunctions.fBindFramebuffer)
, fBindRenderbuffer(&fFunctions.fBindRenderbuffer)
, fBindTexture(&fFunctions.fBindTexture)
, fBindVertexArray(&fFunctions.fBindVertexArray)
, fBlendColor(&fFunctions.fBlendColor)
, fBlendFunc(&fFunctions.fBlendFunc)
, fBlitFramebuffer(&fFunctions.fBlitFramebuffer)
, fBufferData(&fFunctions.fBufferData)
, fBufferSubData(&fFunctions.fBufferSubData)
, fCheckFramebufferStatus(&fFunctions.fCheckFramebufferStatus)
, fClear(&fFunctions.fClear)
, fClearColor(&fFunctions.fClearColor)
, fClearStencil(&fFunctions.fClearStencil)
, fColorMask(&fFunctions.fColorMask)
, fCompileShader(&fFunctions.fCompileShader)
, fCompressedTexImage2D(&fFunctions.fCompressedTexImage2D)
, fCopyTexSubImage2D(&fFunctions.fCopyTexSubImage2D)
, fCreateProgram(&fFunctions.fCreateProgram)
, fCreateShader(&fFunctions.fCreateShader)
, fCullFace(&fFunctions.fCullFace)
, fDeleteBuffers(&fFunctions.fDeleteBuffers)
, fDeleteFramebuffers(&fFunctions.fDeleteFramebuffers)
, fDeleteProgram(&fFunctions.fDeleteProgram)
, fDeleteQueries(&fFunctions.fDeleteQueries)
, fDeleteRenderbuffers(&fFunctions.fDeleteRenderbuffers)
, fDeleteShader(&fFunctions.fDeleteShader)
, fDeleteTextures(&fFunctions.fDeleteTextures)
, fDeleteVertexArrays(&fFunctions.fDeleteVertexArrays)
, fDepthMask(&fFunctions.fDepthMask)
, fDisable(&fFunctions.fDisable)
, fDisableVertexAttribArray(&fFunctions.fDisableVertexAttribArray)
, fDrawArrays(&fFunctions.fDrawArrays)
, fDrawBuffer(&fFunctions.fDrawBuffer)
, fDrawBuffers(&fFunctions.fDrawBuffers)
, fDrawElements(&fFunctions.fDrawElements)
, fEnable(&fFunctions.fEnable)
, fEnableVertexAttribArray(&fFunctions.fEnableVertexAttribArray)
, fEndQuery(&fFunctions.fEndQuery)
, fFinish(&fFunctions.fFinish)
, fFlush(&fFunctions.fFlush)
, fFramebufferRenderbuffer(&fFunctions.fFramebufferRenderbuffer)
, fFramebufferTexture2D(&fFunctions.fFramebufferTexture2D)
, fFramebufferTexture2DMultisample(&fFunctions.fFramebufferTexture2DMultisample)
, fFrontFace(&fFunctions.fFrontFace)
, fGenBuffers(&fFunctions.fGenBuffers)
, fGenFramebuffers(&fFunctions.fGenFramebuffers)
, fGenerateMipmap(&fFunctions.fGenerateMipmap)
, fGenQueries(&fFunctions.fGenQueries)
, fGenRenderbuffers(&fFunctions.fGenRenderbuffers)
, fGenTextures(&fFunctions.fGenTextures)
, fGenVertexArrays(&fFunctions.fGenVertexArrays)
, fGetBufferParameteriv(&fFunctions.fGetBufferParameteriv)
, fGetError(&fFunctions.fGetError)
, fGetFramebufferAttachmentParameteriv(&fFunctions.fGetFramebufferAttachmentParameteriv)
, fGetIntegerv(&fFunctions.fGetIntegerv)
, fGetQueryObjecti64v(&fFunctions.fGetQueryObjecti64v)
, fGetQueryObjectiv(&fFunctions.fGetQueryObjectiv)
, fGetQueryObjectui64v(&fFunctions.fGetQueryObjectui64v)
, fGetQueryObjectuiv(&fFunctions.fGetQueryObjectuiv)
, fGetQueryiv(&fFunctions.fGetQueryiv)
, fGetProgramInfoLog(&fFunctions.fGetProgramInfoLog)
, fGetProgramiv(&fFunctions.fGetProgramiv)
, fGetRenderbufferParameteriv(&fFunctions.fGetRenderbufferParameteriv)
, fGetShaderInfoLog(&fFunctions.fGetShaderInfoLog)
, fGetShaderiv(&fFunctions.fGetShaderiv)
, fGetString(&fFunctions.fGetString)
, fGetStringi(&fFunctions.fGetStringi)
, fGetTexLevelParameteriv(&fFunctions.fGetTexLevelParameteriv)
, fGetUniformLocation(&fFunctions.fGetUniformLocation)
, fInsertEventMarker(&fFunctions.fInsertEventMarker)
, fLineWidth(&fFunctions.fLineWidth)
, fLinkProgram(&fFunctions.fLinkProgram)
, fLoadIdentity(&fFunctions.fLoadIdentity)
, fLoadMatrixf(&fFunctions.fLoadMatrixf)
, fMapBuffer(&fFunctions.fMapBuffer)
, fMatrixMode(&fFunctions.fMatrixMode)
, fPixelStorei(&fFunctions.fPixelStorei)
, fPopGroupMarker(&fFunctions.fPopGroupMarker)
, fPushGroupMarker(&fFunctions.fPushGroupMarker)
, fQueryCounter(&fFunctions.fQueryCounter)
, fReadBuffer(&fFunctions.fReadBuffer)
, fReadPixels(&fFunctions.fReadPixels)
, fRenderbufferStorage(&fFunctions.fRenderbufferStorage)
, fRenderbufferStorageMultisampleES2EXT(&fFunctions.fRenderbufferStorageMultisampleES2EXT)
, fRenderbufferStorageMultisampleES2APPLE(&fFunctions.fRenderbufferStorageMultisampleES2APPLE)
, fRenderbufferStorageMultisample(&fFunctions.fRenderbufferStorageMultisample)
, fBindUniformLocation(&fFunctions.fBindUniformLocation)
, fResolveMultisampleFramebuffer(&fFunctions.fResolveMultisampleFramebuffer)
, fScissor(&fFunctions.fScissor)
, fShaderSource(&fFunctions.fShaderSource)
, fStencilFunc(&fFunctions.fStencilFunc)
, fStencilFuncSeparate(&fFunctions.fStencilFuncSeparate)
, fStencilMask(&fFunctions.fStencilMask)
, fStencilMaskSeparate(&fFunctions.fStencilMaskSeparate)
, fStencilOp(&fFunctions.fStencilOp)
, fStencilOpSeparate(&fFunctions.fStencilOpSeparate)
, fTexGenfv(&fFunctions.fTexGenfv)
, fTexGeni(&fFunctions.fTexGeni)
, fTexImage2D(&fFunctions.fTexImage2D)
, fTexParameteri(&fFunctions.fTexParameteri)
, fTexParameteriv(&fFunctions.fTexParameteriv)
, fTexSubImage2D(&fFunctions.fTexSubImage2D)
, fTexStorage2D(&fFunctions.fTexStorage2D)
, fDiscardFramebuffer(&fFunctions.fDiscardFramebuffer)
, fUniform1f(&fFunctions.fUniform1f)
, fUniform1i(&fFunctions.fUniform1i)
, fUniform1fv(&fFunctions.fUniform1fv)
, fUniform1iv(&fFunctions.fUniform1iv)
, fUniform2f(&fFunctions.fUniform2f)
, fUniform2i(&fFunctions.fUniform2i)
, fUniform2fv(&fFunctions.fUniform2fv)
, fUniform2iv(&fFunctions.fUniform2iv)
, fUniform3f(&fFunctions.fUniform3f)
, fUniform3i(&fFunctions.fUniform3i)
, fUniform3fv(&fFunctions.fUniform3fv)
, fUniform3iv(&fFunctions.fUniform3iv)
, fUniform4f(&fFunctions.fUniform4f)
, fUniform4i(&fFunctions.fUniform4i)
, fUniform4fv(&fFunctions.fUniform4fv)
, fUniform4iv(&fFunctions.fUniform4iv)
, fUniformMatrix2fv(&fFunctions.fUniformMatrix2fv)
, fUniformMatrix3fv(&fFunctions.fUniformMatrix3fv)
, fUniformMatrix4fv(&fFunctions.fUniformMatrix4fv)
, fUnmapBuffer(&fFunctions.fUnmapBuffer)
, fUseProgram(&fFunctions.fUseProgram)
, fVertexAttrib4fv(&fFunctions.fVertexAttrib4fv)
, fVertexAttribPointer(&fFunctions.fVertexAttribPointer)
, fViewport(&fFunctions.fViewport)
, fPathCommands(&fFunctions.fPathCommands)
, fPathCoords(&fFunctions.fPathCoords)
, fPathSubCommands(&fFunctions.fPathSubCommands)
, fPathSubCoords(&fFunctions.fPathSubCoords)
, fPathString(&fFunctions.fPathString)
, fPathGlyphs(&fFunctions.fPathGlyphs)
, fPathGlyphRange(&fFunctions.fPathGlyphRange)
, fWeightPaths(&fFunctions.fWeightPaths)
, fCopyPath(&fFunctions.fCopyPath)
, fInterpolatePaths(&fFunctions.fInterpolatePaths)
, fTransformPath(&fFunctions.fTransformPath)
, fPathParameteriv(&fFunctions.fPathParameteriv)
, fPathParameteri(&fFunctions.fPathParameteri)
, fPathParameterfv(&fFunctions.fPathParameterfv)
, fPathParameterf(&fFunctions.fPathParameterf)
, fPathDashArray(&fFunctions.fPathDashArray)
, fGenPaths(&fFunctions.fGenPaths)
, fDeletePaths(&fFunctions.fDeletePaths)
, fIsPath(&fFunctions.fIsPath)
, fPathStencilFunc(&fFunctions.fPathStencilFunc)
, fPathStencilDepthOffset(&fFunctions.fPathStencilDepthOffset)
, fStencilFillPath(&fFunctions.fStencilFillPath)
, fStencilStrokePath(&fFunctions.fStencilStrokePath)
, fStencilFillPathInstanced(&fFunctions.fStencilFillPathInstanced)
, fStencilStrokePathInstanced(&fFunctions.fStencilStrokePathInstanced)
, fPathCoverDepthFunc(&fFunctions.fPathCoverDepthFunc)
, fPathColorGen(&fFunctions.fPathColorGen)
, fPathTexGen(&fFunctions.fPathTexGen)
, fPathFogGen(&fFunctions.fPathFogGen)
, fCoverFillPath(&fFunctions.fCoverFillPath)
, fCoverStrokePath(&fFunctions.fCoverStrokePath)
, fCoverFillPathInstanced(&fFunctions.fCoverFillPathInstanced)
, fCoverStrokePathInstanced(&fFunctions.fCoverStrokePathInstanced)
, fGetPathParameteriv(&fFunctions.fGetPathParameteriv)
, fGetPathParameterfv(&fFunctions.fGetPathParameterfv)
, fGetPathCommands(&fFunctions.fGetPathCommands)
, fGetPathCoords(&fFunctions.fGetPathCoords)
, fGetPathDashArray(&fFunctions.fGetPathDashArray)
, fGetPathMetrics(&fFunctions.fGetPathMetrics)
, fGetPathMetricRange(&fFunctions.fGetPathMetricRange)
, fGetPathSpacing(&fFunctions.fGetPathSpacing)
, fGetPathColorGeniv(&fFunctions.fGetPathColorGeniv)
, fGetPathColorGenfv(&fFunctions.fGetPathColorGenfv)
, fGetPathTexGeniv(&fFunctions.fGetPathTexGeniv)
, fGetPathTexGenfv(&fFunctions.fGetPathTexGenfv)
, fIsPointInFillPath(&fFunctions.fIsPointInFillPath)
, fIsPointInStrokePath(&fFunctions.fIsPointInStrokePath)
, fGetPathLength(&fFunctions.fGetPathLength)
, fPointAlongPath(&fFunctions.fPointAlongPath) {
GrGLInterface::GrGLInterface() {
fStandard = kNone_GrGLStandard;
#if GR_GL_PER_GL_FUNC_CALLBACK
@ -307,14 +122,8 @@ bool GrGLInterface::validate() const {
return false;
}
// This const hackery is necessary because the factories in Chromium do not yet initialize
// fExtensions.
if (!fExtensions.isInitialized()) {
GrGLExtensions* extensions = const_cast<GrGLExtensions*>(&fExtensions);
if (!extensions->init(fStandard, fFunctions.fGetString, fFunctions.fGetStringi,
fFunctions.fGetIntegerv)) {
return false;
}
return false;
}
// functions that are always required

View File

@ -919,5 +919,8 @@ const GrGLInterface* GrGLCreateDebugInterface() {
functions->fBindFragDataLocationIndexed =
noOpGLBindFragDataLocationIndexed;
interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functions->fGetStringi,
functions->fGetIntegerv);
return interface;
}