aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/debug
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-21 16:09:18 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-21 16:09:18 +0000
commitc72425ae368bfcb47de7d2532eb90d305ec0d1cf (patch)
tree89199d135e0f899f726632155965dc4b3f17cfe4 /src/gpu/gl/debug
parent91506eb0b9461a19c6fc7dc0b15edbdbd1ed094d (diff)
Move GrGLInterface function pointers into a nested struct
BUG=skia:2042 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/133073009 git-svn-id: http://skia.googlecode.com/svn/trunk@13130 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/debug')
-rw-r--r--src/gpu/gl/debug/GrGLCreateDebugInterface.cpp268
1 files changed, 135 insertions, 133 deletions
diff --git a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
index bab5f06577..97ab9c2358 100644
--- a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
+++ b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp
@@ -791,142 +791,144 @@ const GrGLInterface* GrGLCreateDebugInterface() {
GrGLInterface* interface = SkNEW(GrDebugGLInterface);
interface->fStandard = kGL_GrGLStandard;
- interface->fActiveTexture = debugGLActiveTexture;
- interface->fAttachShader = debugGLAttachShader;
- interface->fBeginQuery = debugGLBeginQuery;
- interface->fBindAttribLocation = debugGLBindAttribLocation;
- interface->fBindBuffer = debugGLBindBuffer;
- interface->fBindFragDataLocation = noOpGLBindFragDataLocation;
- interface->fBindTexture = debugGLBindTexture;
- interface->fBindVertexArray = debugGLBindVertexArray;
- interface->fBlendColor = noOpGLBlendColor;
- interface->fBlendFunc = noOpGLBlendFunc;
- interface->fBufferData = debugGLBufferData;
- interface->fBufferSubData = noOpGLBufferSubData;
- interface->fClear = noOpGLClear;
- interface->fClearColor = noOpGLClearColor;
- interface->fClearStencil = noOpGLClearStencil;
- interface->fClientActiveTexture = debugGLClientActiveTexture;
- interface->fColorMask = noOpGLColorMask;
- interface->fCompileShader = noOpGLCompileShader;
- interface->fCompressedTexImage2D = noOpGLCompressedTexImage2D;
- interface->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D;
- interface->fCreateProgram = debugGLCreateProgram;
- interface->fCreateShader = debugGLCreateShader;
- interface->fCullFace = noOpGLCullFace;
- interface->fDeleteBuffers = debugGLDeleteBuffers;
- interface->fDeleteProgram = debugGLDeleteProgram;
- interface->fDeleteQueries = noOpGLDeleteIds;
- interface->fDeleteShader = debugGLDeleteShader;
- interface->fDeleteTextures = debugGLDeleteTextures;
- interface->fDeleteVertexArrays = debugGLDeleteVertexArrays;
- 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->fGenerateMipmap = debugGLGenerateMipmap;
- interface->fGenBuffers = debugGLGenBuffers;
- interface->fGenQueries = noOpGLGenIds;
- interface->fGenTextures = debugGLGenTextures;
- interface->fGetBufferParameteriv = debugGLGetBufferParameteriv;
- 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->fGenVertexArrays = debugGLGenVertexArrays;
- interface->fLoadIdentity = noOpGLLoadIdentity;
- interface->fLoadMatrixf = noOpGLLoadMatrixf;
- interface->fLineWidth = noOpGLLineWidth;
- interface->fLinkProgram = noOpGLLinkProgram;
- interface->fMatrixMode = noOpGLMatrixMode;
- interface->fPixelStorei = debugGLPixelStorei;
- interface->fQueryCounter = noOpGLQueryCounter;
- interface->fReadBuffer = noOpGLReadBuffer;
- interface->fReadPixels = debugGLReadPixels;
- 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 = debugGLUseProgram;
- interface->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
- interface->fVertexAttribPointer = noOpGLVertexAttribPointer;
- interface->fVertexPointer = noOpGLVertexPointer;
- interface->fViewport = noOpGLViewport;
- interface->fBindFramebuffer = debugGLBindFramebuffer;
- interface->fBindRenderbuffer = debugGLBindRenderbuffer;
- interface->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus;
- interface->fDeleteFramebuffers = debugGLDeleteFramebuffers;
- interface->fDeleteRenderbuffers = debugGLDeleteRenderbuffers;
- interface->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer;
- interface->fFramebufferTexture2D = debugGLFramebufferTexture2D;
- interface->fGenFramebuffers = debugGLGenFramebuffers;
- interface->fGenRenderbuffers = debugGLGenRenderbuffers;
- interface->fGetFramebufferAttachmentParameteriv =
+
+ GrGLInterface::Functions* functions = &interface->fFunctions;
+ functions->fActiveTexture = debugGLActiveTexture;
+ functions->fAttachShader = debugGLAttachShader;
+ functions->fBeginQuery = debugGLBeginQuery;
+ functions->fBindAttribLocation = debugGLBindAttribLocation;
+ functions->fBindBuffer = debugGLBindBuffer;
+ functions->fBindFragDataLocation = noOpGLBindFragDataLocation;
+ functions->fBindTexture = debugGLBindTexture;
+ functions->fBindVertexArray = debugGLBindVertexArray;
+ functions->fBlendColor = noOpGLBlendColor;
+ functions->fBlendFunc = noOpGLBlendFunc;
+ functions->fBufferData = debugGLBufferData;
+ functions->fBufferSubData = noOpGLBufferSubData;
+ functions->fClear = noOpGLClear;
+ functions->fClearColor = noOpGLClearColor;
+ functions->fClearStencil = noOpGLClearStencil;
+ functions->fClientActiveTexture = debugGLClientActiveTexture;
+ functions->fColorMask = noOpGLColorMask;
+ functions->fCompileShader = noOpGLCompileShader;
+ functions->fCompressedTexImage2D = noOpGLCompressedTexImage2D;
+ functions->fCopyTexSubImage2D = noOpGLCopyTexSubImage2D;
+ functions->fCreateProgram = debugGLCreateProgram;
+ functions->fCreateShader = debugGLCreateShader;
+ functions->fCullFace = noOpGLCullFace;
+ functions->fDeleteBuffers = debugGLDeleteBuffers;
+ functions->fDeleteProgram = debugGLDeleteProgram;
+ functions->fDeleteQueries = noOpGLDeleteIds;
+ functions->fDeleteShader = debugGLDeleteShader;
+ functions->fDeleteTextures = debugGLDeleteTextures;
+ functions->fDeleteVertexArrays = debugGLDeleteVertexArrays;
+ 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->fGenerateMipmap = debugGLGenerateMipmap;
+ functions->fGenBuffers = debugGLGenBuffers;
+ functions->fGenQueries = noOpGLGenIds;
+ functions->fGenTextures = debugGLGenTextures;
+ functions->fGetBufferParameteriv = debugGLGetBufferParameteriv;
+ 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->fGenVertexArrays = debugGLGenVertexArrays;
+ functions->fLoadIdentity = noOpGLLoadIdentity;
+ functions->fLoadMatrixf = noOpGLLoadMatrixf;
+ functions->fLineWidth = noOpGLLineWidth;
+ functions->fLinkProgram = noOpGLLinkProgram;
+ functions->fMatrixMode = noOpGLMatrixMode;
+ functions->fPixelStorei = debugGLPixelStorei;
+ functions->fQueryCounter = noOpGLQueryCounter;
+ functions->fReadBuffer = noOpGLReadBuffer;
+ functions->fReadPixels = debugGLReadPixels;
+ 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 = debugGLUseProgram;
+ functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
+ functions->fVertexAttribPointer = noOpGLVertexAttribPointer;
+ functions->fVertexPointer = noOpGLVertexPointer;
+ functions->fViewport = noOpGLViewport;
+ functions->fBindFramebuffer = debugGLBindFramebuffer;
+ functions->fBindRenderbuffer = debugGLBindRenderbuffer;
+ functions->fCheckFramebufferStatus = noOpGLCheckFramebufferStatus;
+ functions->fDeleteFramebuffers = debugGLDeleteFramebuffers;
+ functions->fDeleteRenderbuffers = debugGLDeleteRenderbuffers;
+ functions->fFramebufferRenderbuffer = debugGLFramebufferRenderbuffer;
+ functions->fFramebufferTexture2D = debugGLFramebufferTexture2D;
+ functions->fGenFramebuffers = debugGLGenFramebuffers;
+ functions->fGenRenderbuffers = debugGLGenRenderbuffers;
+ functions->fGetFramebufferAttachmentParameteriv =
noOpGLGetFramebufferAttachmentParameteriv;
- interface->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv;
- interface->fRenderbufferStorage = noOpGLRenderbufferStorage;
- interface->fRenderbufferStorageMultisample =
+ functions->fGetRenderbufferParameteriv = noOpGLGetRenderbufferParameteriv;
+ functions->fRenderbufferStorage = noOpGLRenderbufferStorage;
+ functions->fRenderbufferStorageMultisample =
noOpGLRenderbufferStorageMultisample;
- interface->fBlitFramebuffer = noOpGLBlitFramebuffer;
- interface->fResolveMultisampleFramebuffer =
+ functions->fBlitFramebuffer = noOpGLBlitFramebuffer;
+ functions->fResolveMultisampleFramebuffer =
noOpGLResolveMultisampleFramebuffer;
- interface->fMapBuffer = debugGLMapBuffer;
- interface->fUnmapBuffer = debugGLUnmapBuffer;
- interface->fBindFragDataLocationIndexed =
+ functions->fMapBuffer = debugGLMapBuffer;
+ functions->fUnmapBuffer = debugGLUnmapBuffer;
+ functions->fBindFragDataLocationIndexed =
noOpGLBindFragDataLocationIndexed;
return interface;