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

Unified Diff: src/gpu/gl/angle/GrGLCreateANGLEInterface.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
Index: src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
diff --git a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
index 62f760818dc51714ff857dc1f9bd9ad21d2bb61a..2858541ed9c2bfdf75211d184cd4b4a87be609dc 100644
--- a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
+++ b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
@@ -18,7 +18,7 @@
#include "EGL/egl.h"
#define GET_PROC(name) \
- interface->f ## name = (GrGL ## name ## Proc) GetProcAddress(ghANGLELib, "gl" #name);
+ interface->fFunctions.f ## name = (GrGL ## name ## Proc) GetProcAddress(ghANGLELib, "gl" #name);
const GrGLInterface* GrGLCreateANGLEInterface() {
@@ -36,12 +36,14 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
GrGLInterface* interface = SkNEW(GrGLInterface);
interface->fStandard = kGLES_GrGLStandard;
+ GrGLInterface::Functions* functions = &interface->fFunctions;
+
GET_PROC(ActiveTexture);
GET_PROC(AttachShader);
GET_PROC(BindAttribLocation);
GET_PROC(BindBuffer);
GET_PROC(BindTexture);
- interface->fBindVertexArray =
+ functions->fBindVertexArray =
(GrGLBindVertexArrayProc) eglGetProcAddress("glBindVertexArrayOES");
GET_PROC(BlendColor);
GET_PROC(BlendFunc);
@@ -61,7 +63,7 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
GET_PROC(DeleteProgram);
GET_PROC(DeleteShader);
GET_PROC(DeleteTextures);
- interface->fDeleteVertexArrays =
+ functions->fDeleteVertexArrays =
(GrGLDeleteVertexArraysProc) eglGetProcAddress("glDeleteVertexArraysOES");
GET_PROC(DepthMask);
GET_PROC(Disable);
@@ -76,7 +78,7 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
GET_PROC(GenBuffers);
GET_PROC(GenerateMipmap);
GET_PROC(GenTextures);
- interface->fGenVertexArrays =
+ functions->fGenVertexArrays =
(GrGLGenVertexArraysProc) eglGetProcAddress("glGenVertexArraysOES");
GET_PROC(GetBufferParameteriv);
GET_PROC(GetError);
@@ -106,7 +108,7 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
#if GL_ARB_texture_storage
GET_PROC(TexStorage2D);
#elif GL_EXT_texture_storage
- interface->fTexStorage2D = (GrGLTexStorage2DProc) eglGetProcAddress("glTexStorage2DEXT");
+ functions->fTexStorage2D = (GrGLTexStorage2DProc) eglGetProcAddress("glTexStorage2DEXT");
#endif
GET_PROC(Uniform1f);
GET_PROC(Uniform1i);
@@ -148,7 +150,7 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
GET_PROC(GetRenderbufferParameteriv);
GET_PROC(RenderbufferStorage);
- interface->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOES");
- interface->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBufferOES");
+ functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOES");
+ functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBufferOES");
return interface;
}
« no previous file with comments | « src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698