OLD | NEW |
1 // Modified from chromium/src/webkit/glue/gl_bindings_skia_cmd_buffer.cc | 1 // Modified from chromium/src/webkit/glue/gl_bindings_skia_cmd_buffer.cc |
2 | 2 |
3 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
6 | 6 |
7 #include "gl/GrGLInterface.h" | 7 #include "gl/GrGLInterface.h" |
8 | 8 |
9 #ifndef GL_GLEXT_PROTOTYPES | 9 #ifndef GL_GLEXT_PROTOTYPES |
10 #define GL_GLEXT_PROTOTYPES | 10 #define GL_GLEXT_PROTOTYPES |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 interface->fTexParameteri = glTexParameteri; | 88 interface->fTexParameteri = glTexParameteri; |
89 interface->fTexParameteriv = glTexParameteriv; | 89 interface->fTexParameteriv = glTexParameteriv; |
90 interface->fTexSubImage2D = glTexSubImage2D; | 90 interface->fTexSubImage2D = glTexSubImage2D; |
91 #if GL_ARB_texture_storage | 91 #if GL_ARB_texture_storage |
92 interface->fTexStorage2D = glTexStorage2D; | 92 interface->fTexStorage2D = glTexStorage2D; |
93 #elif GL_EXT_texture_storage | 93 #elif GL_EXT_texture_storage |
94 interface->fTexStorage2D = glTexStorage2DEXT; | 94 interface->fTexStorage2D = glTexStorage2DEXT; |
95 #else | 95 #else |
96 interface->fTexStorage2D = (GrGLTexStorage2DProc) eglGetProcAddress("glT
exStorage2DEXT"); | 96 interface->fTexStorage2D = (GrGLTexStorage2DProc) eglGetProcAddress("glT
exStorage2DEXT"); |
97 #endif | 97 #endif |
| 98 #if GL_EXT_discard_framebuffer |
| 99 interface->fDiscardFramebuffer = glDiscardFramebufferEXT; |
| 100 #endif |
98 interface->fUniform1f = glUniform1f; | 101 interface->fUniform1f = glUniform1f; |
99 interface->fUniform1i = glUniform1i; | 102 interface->fUniform1i = glUniform1i; |
100 interface->fUniform1fv = glUniform1fv; | 103 interface->fUniform1fv = glUniform1fv; |
101 interface->fUniform1iv = glUniform1iv; | 104 interface->fUniform1iv = glUniform1iv; |
102 interface->fUniform2f = glUniform2f; | 105 interface->fUniform2f = glUniform2f; |
103 interface->fUniform2i = glUniform2i; | 106 interface->fUniform2i = glUniform2i; |
104 interface->fUniform2fv = glUniform2fv; | 107 interface->fUniform2fv = glUniform2fv; |
105 interface->fUniform2iv = glUniform2iv; | 108 interface->fUniform2iv = glUniform2iv; |
106 interface->fUniform3f = glUniform3f; | 109 interface->fUniform3f = glUniform3f; |
107 interface->fUniform3i = glUniform3i; | 110 interface->fUniform3i = glUniform3i; |
(...skipping 30 matching lines...) Expand all Loading... |
138 interface->fMapBuffer = glMapBufferOES; | 141 interface->fMapBuffer = glMapBufferOES; |
139 interface->fUnmapBuffer = glUnmapBufferOES; | 142 interface->fUnmapBuffer = glUnmapBufferOES; |
140 #else | 143 #else |
141 interface->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBuff
erOES"); | 144 interface->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBuff
erOES"); |
142 interface->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnm
apBufferOES"); | 145 interface->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnm
apBufferOES"); |
143 #endif | 146 #endif |
144 } | 147 } |
145 glInterface.get()->ref(); | 148 glInterface.get()->ref(); |
146 return glInterface.get(); | 149 return glInterface.get(); |
147 } | 150 } |
OLD | NEW |