diff options
author | 2012-09-11 20:01:04 +0000 | |
---|---|---|
committer | 2012-09-11 20:01:04 +0000 | |
commit | 056f51b431ee4e99f62f31489cfd86142623bc0a (patch) | |
tree | 304609e09cfd9e19a629a3fd9a4db6653956c5e8 /src/gpu/android/GrGLCreateNativeInterface_android.cpp | |
parent | e79de0c078ec590027c84a2156ebe2923566eb88 (diff) |
Fix GrGLCreateNativeInterface_android
Review URL: https://codereview.appspot.com/6503101
git-svn-id: http://skia.googlecode.com/svn/trunk@5499 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/android/GrGLCreateNativeInterface_android.cpp')
-rw-r--r-- | src/gpu/android/GrGLCreateNativeInterface_android.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gpu/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/android/GrGLCreateNativeInterface_android.cpp index 535fa86903..688f00dd2f 100644 --- a/src/gpu/android/GrGLCreateNativeInterface_android.cpp +++ b/src/gpu/android/GrGLCreateNativeInterface_android.cpp @@ -13,6 +13,8 @@ #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> +#include <EGL/egl.h> + const GrGLInterface* GrGLCreateNativeInterface() { static SkAutoTUnref<GrGLInterface> glInterface; if (!glInterface.get()) { @@ -82,6 +84,8 @@ const GrGLInterface* GrGLCreateNativeInterface() { interface->fTexStorage2D = glTexStorage2D; #elif GL_EXT_texture_storage interface->fTexStorage2D = glTexStorage2DEXT; +#else + interface->fTexStorage2D = (GrGLTexStorage2DProc) eglGetProcAddress("glTexStorage2DEXT"); #endif interface->fUniform1f = glUniform1f; interface->fUniform1i = glUniform1i; @@ -118,10 +122,13 @@ const GrGLInterface* GrGLCreateNativeInterface() { interface->fGetFramebufferAttachmentParameteriv = glGetFramebufferAttachmentParameteriv; interface->fGetRenderbufferParameteriv = glGetRenderbufferParameteriv; interface->fRenderbufferStorage = glRenderbufferStorage; - #if GL_OES_mapbuffer +#if GL_OES_mapbuffer interface->fMapBuffer = glMapBufferOES; interface->fUnmapBuffer = glUnmapBufferOES; - #endif +#else + interface->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOES"); + interface->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBufferOES"); +#endif } glInterface.get()->ref(); return glInterface.get(); |