| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 GET_PROC(FramebufferTexture2D); | 147 GET_PROC(FramebufferTexture2D); |
| 148 GET_PROC(GenFramebuffers); | 148 GET_PROC(GenFramebuffers); |
| 149 GET_PROC(GenRenderbuffers); | 149 GET_PROC(GenRenderbuffers); |
| 150 GET_PROC(GetFramebufferAttachmentParameteriv); | 150 GET_PROC(GetFramebufferAttachmentParameteriv); |
| 151 GET_PROC(GetRenderbufferParameteriv); | 151 GET_PROC(GetRenderbufferParameteriv); |
| 152 GET_PROC(RenderbufferStorage); | 152 GET_PROC(RenderbufferStorage); |
| 153 | 153 |
| 154 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE
S"); | 154 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE
S"); |
| 155 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu
fferOES"); | 155 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu
fferOES"); |
| 156 | 156 |
| 157 #if GL_ES_VERSION_3_0 |
| 158 functions->fMapBufferRange = GET_PROC(glMapBufferRange); |
| 159 functions->fFlushMappedBufferRange = GET_PROC(glFlushMappedBufferRange); |
| 160 #else |
| 161 functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glM
apBufferRange"); |
| 162 functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGet
ProcAddress("glFlushMappedBufferRange"); |
| 163 #endif |
| 164 |
| 157 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddres
s("glInsertEventMarkerEXT"); | 165 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddres
s("glInsertEventMarkerEXT"); |
| 158 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress(
"glPushGroupMarkerEXT"); | 166 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress(
"glPushGroupMarkerEXT"); |
| 159 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glP
opGroupMarkerEXT"); | 167 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glP
opGroupMarkerEXT"); |
| 160 | 168 |
| 161 #if GL_ES_VERSION_3_0 | 169 #if GL_ES_VERSION_3_0 |
| 162 GET_PROC(InvalidateFramebuffer); | 170 GET_PROC(InvalidateFramebuffer); |
| 163 GET_PROC(InvalidateSubFramebuffer); | 171 GET_PROC(InvalidateSubFramebuffer); |
| 164 #else | 172 #else |
| 165 functions->fInvalidateFramebuffer = (GrGLInvalidateFramebufferProc) eglGetPr
ocAddress("glInvalidateFramebuffer"); | 173 functions->fInvalidateFramebuffer = (GrGLInvalidateFramebufferProc) eglGetPr
ocAddress("glInvalidateFramebuffer"); |
| 166 functions->fInvalidateSubFramebuffer = (GrGLInvalidateSubFramebufferProc) eg
lGetProcAddress("glInvalidateSubFramebuffer"); | 174 functions->fInvalidateSubFramebuffer = (GrGLInvalidateSubFramebufferProc) eg
lGetProcAddress("glInvalidateSubFramebuffer"); |
| 167 #endif | 175 #endif |
| 168 functions->fInvalidateBufferData = (GrGLInvalidateBufferDataProc) eglGetProc
Address("glInvalidateBufferData"); | 176 functions->fInvalidateBufferData = (GrGLInvalidateBufferDataProc) eglGetProc
Address("glInvalidateBufferData"); |
| 169 functions->fInvalidateBufferSubData = (GrGLInvalidateBufferSubDataProc) eglG
etProcAddress("glInvalidateBufferSubData"); | 177 functions->fInvalidateBufferSubData = (GrGLInvalidateBufferSubDataProc) eglG
etProcAddress("glInvalidateBufferSubData"); |
| 170 functions->fInvalidateTexImage = (GrGLInvalidateTexImageProc) eglGetProcAddr
ess("glInvalidateTexImage"); | 178 functions->fInvalidateTexImage = (GrGLInvalidateTexImageProc) eglGetProcAddr
ess("glInvalidateTexImage"); |
| 171 functions->fInvalidateTexSubImage = (GrGLInvalidateTexSubImageProc) eglGetPr
ocAddress("glInvalidateTexSubImage"); | 179 functions->fInvalidateTexSubImage = (GrGLInvalidateTexSubImageProc) eglGetPr
ocAddress("glInvalidateTexSubImage"); |
| 172 | 180 |
| 173 interface->fExtensions.init(kGLES_GrGLStandard, | 181 interface->fExtensions.init(kGLES_GrGLStandard, |
| 174 functions->fGetString, | 182 functions->fGetString, |
| 175 functions->fGetStringi, | 183 functions->fGetStringi, |
| 176 functions->fGetIntegerv); | 184 functions->fGetIntegerv); |
| 177 return interface; | 185 return interface; |
| 178 } | 186 } |
| OLD | NEW |