Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: src/gpu/gl/GrGLCreateNullInterface.cpp

Issue 133073009: Move GrGLInterface function pointers into a nested struct (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload again, rietveld diff failed. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCreateNullInterface.cpp
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index d1d851dc0fa23f62d0209d2a00637ae0aea86c73..105fb0b604478fb30a6dfcfc748f09ab39caa6d8 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -266,140 +266,143 @@ const GrGLInterface* GrGLCreateNullInterface() {
if (!glInterface.get()) {
GrGLInterface* interface = SkNEW(GrGLInterface);
glInterface.reset(interface);
+
interface->fStandard = kGL_GrGLStandard;
- interface->fActiveTexture = nullGLActiveTexture;
- interface->fAttachShader = nullGLAttachShader;
- interface->fBeginQuery = nullGLBeginQuery;
- interface->fBindAttribLocation = nullGLBindAttribLocation;
- interface->fBindBuffer = nullGLBindBuffer;
- interface->fBindFragDataLocation = noOpGLBindFragDataLocation;
- interface->fBindTexture = nullGLBindTexture;
- interface->fBindVertexArray = nullGLBindVertexArray;
- interface->fBlendColor = noOpGLBlendColor;
- interface->fBlendFunc = noOpGLBlendFunc;
- interface->fBufferData = nullGLBufferData;
- interface->fBufferSubData = noOpGLBufferSubData;
- interface->fClear = noOpGLClear;
- interface->fClearColor = noOpGLClearColor;
- interface->fClearStencil = noOpGLClearStencil;
- interface->fClientActiveTexture = nullGLClientActiveTexture;
- interface->fColorMask = noOpGLColorMask;
- interface->fCompileShader = noOpGLCompileShader;
- interface->fCompressedTexImage2D = noOpGLCompressedTexImage2D;
- interface->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D;
- interface->fCreateProgram = nullGLCreateProgram;
- interface->fCreateShader = nullGLCreateShader;
- interface->fCullFace = noOpGLCullFace;
- interface->fDeleteBuffers = nullGLDeleteBuffers;
- interface->fDeleteProgram = nullGLDelete;
- interface->fDeleteQueries = noOpGLDeleteIds;
- interface->fDeleteShader = nullGLDelete;
- interface->fDeleteTextures = noOpGLDeleteIds;
- interface->fDeleteVertexArrays = noOpGLDeleteIds;
- interface->fDepthMask = noOpGLDepthMask;
- interface->fDisable = noOpGLDisable;
- interface->fDisableClientState = noOpGLDisableClientState;
- interface->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray;
- interface->fDrawArrays = noOpGLDrawArrays;
- interface->fDrawBuffer = noOpGLDrawBuffer;
- interface->fDrawBuffers = noOpGLDrawBuffers;
- interface->fDrawElements = noOpGLDrawElements;
- interface->fEnable = noOpGLEnable;
- interface->fEnableClientState = noOpGLEnableClientState;
- interface->fEnableVertexAttribArray = noOpGLEnableVertexAttribArray;
- interface->fEndQuery = noOpGLEndQuery;
- interface->fFinish = noOpGLFinish;
- interface->fFlush = noOpGLFlush;
- interface->fFrontFace = noOpGLFrontFace;
- interface->fGenBuffers = nullGLGenBuffers;
- interface->fGenerateMipmap = nullGLGenerateMipmap;
- interface->fGenQueries = noOpGLGenIds;
- interface->fGenTextures = noOpGLGenIds;
- interface->fGenVertexArrays = noOpGLGenIds;
- interface->fGetBufferParameteriv = nullGLGetBufferParameteriv;
- interface->fGetError = noOpGLGetError;
- interface->fGetIntegerv = noOpGLGetIntegerv;
- interface->fGetQueryObjecti64v = noOpGLGetQueryObjecti64v;
- interface->fGetQueryObjectiv = noOpGLGetQueryObjectiv;
- interface->fGetQueryObjectui64v = noOpGLGetQueryObjectui64v;
- interface->fGetQueryObjectuiv = noOpGLGetQueryObjectuiv;
- interface->fGetQueryiv = noOpGLGetQueryiv;
- interface->fGetProgramInfoLog = noOpGLGetInfoLog;
- interface->fGetProgramiv = noOpGLGetShaderOrProgramiv;
- interface->fGetShaderInfoLog = noOpGLGetInfoLog;
- interface->fGetShaderiv = noOpGLGetShaderOrProgramiv;
- interface->fGetString = noOpGLGetString;
- interface->fGetStringi = noOpGLGetStringi;
- interface->fGetTexLevelParameteriv = noOpGLGetTexLevelParameteriv;
- interface->fGetUniformLocation = noOpGLGetUniformLocation;
- interface->fLoadIdentity = noOpGLLoadIdentity;
- interface->fLoadMatrixf = noOpGLLoadMatrixf;
- interface->fLineWidth = noOpGLLineWidth;
- interface->fLinkProgram = noOpGLLinkProgram;
- interface->fMatrixMode = noOpGLMatrixMode;
- interface->fPixelStorei = nullGLPixelStorei;
- interface->fQueryCounter = noOpGLQueryCounter;
- interface->fReadBuffer = noOpGLReadBuffer;
- interface->fReadPixels = nullGLReadPixels;
- interface->fScissor = noOpGLScissor;
- interface->fShaderSource = noOpGLShaderSource;
- interface->fStencilFunc = noOpGLStencilFunc;
- interface->fStencilFuncSeparate = noOpGLStencilFuncSeparate;
- interface->fStencilMask = noOpGLStencilMask;
- interface->fStencilMaskSeparate = noOpGLStencilMaskSeparate;
- interface->fStencilOp = noOpGLStencilOp;
- interface->fStencilOpSeparate = noOpGLStencilOpSeparate;
- interface->fTexGenf = noOpGLTexGenf;
- interface->fTexGenfv = noOpGLTexGenfv;
- interface->fTexGeni = noOpGLTexGeni;
- interface->fTexImage2D = noOpGLTexImage2D;
- interface->fTexParameteri = noOpGLTexParameteri;
- interface->fTexParameteriv = noOpGLTexParameteriv;
- interface->fTexSubImage2D = noOpGLTexSubImage2D;
- interface->fTexStorage2D = noOpGLTexStorage2D;
- interface->fDiscardFramebuffer = noOpGLDiscardFramebuffer;
- interface->fUniform1f = noOpGLUniform1f;
- interface->fUniform1i = noOpGLUniform1i;
- interface->fUniform1fv = noOpGLUniform1fv;
- interface->fUniform1iv = noOpGLUniform1iv;
- interface->fUniform2f = noOpGLUniform2f;
- interface->fUniform2i = noOpGLUniform2i;
- interface->fUniform2fv = noOpGLUniform2fv;
- interface->fUniform2iv = noOpGLUniform2iv;
- interface->fUniform3f = noOpGLUniform3f;
- interface->fUniform3i = noOpGLUniform3i;
- interface->fUniform3fv = noOpGLUniform3fv;
- interface->fUniform3iv = noOpGLUniform3iv;
- interface->fUniform4f = noOpGLUniform4f;
- interface->fUniform4i = noOpGLUniform4i;
- interface->fUniform4fv = noOpGLUniform4fv;
- interface->fUniform4iv = noOpGLUniform4iv;
- interface->fUniformMatrix2fv = noOpGLUniformMatrix2fv;
- interface->fUniformMatrix3fv = noOpGLUniformMatrix3fv;
- interface->fUniformMatrix4fv = noOpGLUniformMatrix4fv;
- interface->fUseProgram = nullGLUseProgram;
- interface->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
- interface->fVertexAttribPointer = noOpGLVertexAttribPointer;
- interface->fVertexPointer = noOpGLVertexPointer;
- interface->fViewport = nullGLViewport;
- interface->fBindFramebuffer = nullGLBindFramebuffer;
- interface->fBindRenderbuffer = nullGLBindRenderbuffer;
- interface->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus;
- interface->fDeleteFramebuffers = nullGLDeleteFramebuffers;
- interface->fDeleteRenderbuffers = nullGLDeleteRenderbuffers;
- interface->fFramebufferRenderbuffer = nullGLFramebufferRenderbuffer;
- interface->fFramebufferTexture2D = nullGLFramebufferTexture2D;
- interface->fGenFramebuffers = noOpGLGenIds;
- interface->fGenRenderbuffers = noOpGLGenIds;
- interface->fGetFramebufferAttachmentParameteriv = noOpGLGetFramebufferAttachmentParameteriv;
- interface->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv;
- interface->fRenderbufferStorage = noOpGLRenderbufferStorage;
- interface->fRenderbufferStorageMultisample = noOpGLRenderbufferStorageMultisample;
- interface->fBlitFramebuffer = noOpGLBlitFramebuffer;
- interface->fResolveMultisampleFramebuffer = noOpGLResolveMultisampleFramebuffer;
- interface->fMapBuffer = nullGLMapBuffer;
- interface->fUnmapBuffer = nullGLUnmapBuffer;
- interface->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationIndexed;
+
+ 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->fClientActiveTexture = nullGLClientActiveTexture;
+ 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->fDisableClientState = noOpGLDisableClientState;
+ functions->fDisableVertexAttribArray = noOpGLDisableVertexAttribArray;
+ functions->fDrawArrays = noOpGLDrawArrays;
+ functions->fDrawBuffer = noOpGLDrawBuffer;
+ functions->fDrawBuffers = noOpGLDrawBuffers;
+ functions->fDrawElements = noOpGLDrawElements;
+ functions->fEnable = noOpGLEnable;
+ functions->fEnableClientState = noOpGLEnableClientState;
+ 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->fLoadIdentity = noOpGLLoadIdentity;
+ functions->fLoadMatrixf = noOpGLLoadMatrixf;
+ functions->fLineWidth = noOpGLLineWidth;
+ functions->fLinkProgram = noOpGLLinkProgram;
+ functions->fMatrixMode = noOpGLMatrixMode;
+ functions->fPixelStorei = nullGLPixelStorei;
+ 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->fTexGenf = noOpGLTexGenf;
+ 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->fVertexPointer = noOpGLVertexPointer;
+ 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();
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698