| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 GR_GL_GET_PROC(GetShaderiv); | 112 GR_GL_GET_PROC(GetShaderiv); |
| 113 functions->fGetString = glGetString; | 113 functions->fGetString = glGetString; |
| 114 GR_GL_GET_PROC(GetStringi); | 114 GR_GL_GET_PROC(GetStringi); |
| 115 functions->fGetTexLevelParameteriv = glGetTexLevelParameteriv; | 115 functions->fGetTexLevelParameteriv = glGetTexLevelParameteriv; |
| 116 GR_GL_GET_PROC(GenQueries); | 116 GR_GL_GET_PROC(GenQueries); |
| 117 functions->fGenTextures = glGenTextures; | 117 functions->fGenTextures = glGenTextures; |
| 118 GR_GL_GET_PROC(GetUniformLocation); | 118 GR_GL_GET_PROC(GetUniformLocation); |
| 119 functions->fLineWidth = glLineWidth; | 119 functions->fLineWidth = glLineWidth; |
| 120 GR_GL_GET_PROC(LinkProgram); | 120 GR_GL_GET_PROC(LinkProgram); |
| 121 GR_GL_GET_PROC(MapBuffer); | 121 GR_GL_GET_PROC(MapBuffer); |
| 122 if (extensions.has("GL_EXT_direct_state_access")) { |
| 123 GR_GL_GET_PROC_SUFFIX(MatrixLoadf, EXT); |
| 124 GR_GL_GET_PROC_SUFFIX(MatrixLoadIdentity, EXT); |
| 125 } |
| 122 functions->fPixelStorei = glPixelStorei; | 126 functions->fPixelStorei = glPixelStorei; |
| 123 functions->fReadBuffer = glReadBuffer; | 127 functions->fReadBuffer = glReadBuffer; |
| 124 functions->fReadPixels = glReadPixels; | 128 functions->fReadPixels = glReadPixels; |
| 125 functions->fScissor = glScissor; | 129 functions->fScissor = glScissor; |
| 126 GR_GL_GET_PROC(ShaderSource); | 130 GR_GL_GET_PROC(ShaderSource); |
| 127 functions->fStencilFunc = glStencilFunc; | 131 functions->fStencilFunc = glStencilFunc; |
| 128 GR_GL_GET_PROC(StencilFuncSeparate); | 132 GR_GL_GET_PROC(StencilFuncSeparate); |
| 129 functions->fStencilMask = glStencilMask; | 133 functions->fStencilMask = glStencilMask; |
| 130 GR_GL_GET_PROC(StencilMaskSeparate); | 134 GR_GL_GET_PROC(StencilMaskSeparate); |
| 131 functions->fStencilOp = glStencilOp; | 135 functions->fStencilOp = glStencilOp; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 211 } |
| 208 if (extensions.has("GL_EXT_framebuffer_blit")) { | 212 if (extensions.has("GL_EXT_framebuffer_blit")) { |
| 209 GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT); | 213 GR_GL_GET_PROC_SUFFIX(BlitFramebuffer, EXT); |
| 210 } | 214 } |
| 211 } else { | 215 } else { |
| 212 // we must have FBOs | 216 // we must have FBOs |
| 213 delete interface; | 217 delete interface; |
| 214 return NULL; | 218 return NULL; |
| 215 } | 219 } |
| 216 | 220 |
| 217 GR_GL_GET_PROC(LoadIdentity); | |
| 218 GR_GL_GET_PROC(LoadMatrixf); | |
| 219 GR_GL_GET_PROC(MatrixMode); | |
| 220 | |
| 221 if (extensions.has("GL_NV_path_rendering")) { | 221 if (extensions.has("GL_NV_path_rendering")) { |
| 222 GR_GL_GET_PROC_SUFFIX(PathCommands, NV); | 222 GR_GL_GET_PROC_SUFFIX(PathCommands, NV); |
| 223 GR_GL_GET_PROC_SUFFIX(PathCoords, NV); | 223 GR_GL_GET_PROC_SUFFIX(PathCoords, NV); |
| 224 GR_GL_GET_PROC_SUFFIX(PathSubCommands, NV); | 224 GR_GL_GET_PROC_SUFFIX(PathSubCommands, NV); |
| 225 GR_GL_GET_PROC_SUFFIX(PathSubCoords, NV); | 225 GR_GL_GET_PROC_SUFFIX(PathSubCoords, NV); |
| 226 GR_GL_GET_PROC_SUFFIX(PathString, NV); | 226 GR_GL_GET_PROC_SUFFIX(PathString, NV); |
| 227 GR_GL_GET_PROC_SUFFIX(PathGlyphs, NV); | 227 GR_GL_GET_PROC_SUFFIX(PathGlyphs, NV); |
| 228 GR_GL_GET_PROC_SUFFIX(PathGlyphRange, NV); | 228 GR_GL_GET_PROC_SUFFIX(PathGlyphRange, NV); |
| 229 GR_GL_GET_PROC_SUFFIX(WeightPaths, NV); | 229 GR_GL_GET_PROC_SUFFIX(WeightPaths, NV); |
| 230 GR_GL_GET_PROC_SUFFIX(CopyPath, NV); | 230 GR_GL_GET_PROC_SUFFIX(CopyPath, NV); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 GR_GL_GET_PROC(InvalidateSubFramebuffer); | 283 GR_GL_GET_PROC(InvalidateSubFramebuffer); |
| 284 GR_GL_GET_PROC(InvalidateTexImage); | 284 GR_GL_GET_PROC(InvalidateTexImage); |
| 285 GR_GL_GET_PROC(InvalidateTexSubImage); | 285 GR_GL_GET_PROC(InvalidateTexSubImage); |
| 286 } | 286 } |
| 287 | 287 |
| 288 interface->fStandard = kGL_GrGLStandard; | 288 interface->fStandard = kGL_GrGLStandard; |
| 289 interface->fExtensions.swap(&extensions); | 289 interface->fExtensions.swap(&extensions); |
| 290 | 290 |
| 291 return interface; | 291 return interface; |
| 292 } | 292 } |
| OLD | NEW |