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/GrGLExtensions.h" | 7 #include "gl/GrGLExtensions.h" |
8 #include "gl/GrGLInterface.h" | 8 #include "gl/GrGLInterface.h" |
9 #include "gl/GrGLUtil.h" | 9 #include "gl/GrGLUtil.h" |
10 | 10 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 functions->fGetProgramiv = (GrGLGetProgramivProc) eglGetProcAddress("glGetPr
ogramiv"); | 300 functions->fGetProgramiv = (GrGLGetProgramivProc) eglGetProcAddress("glGetPr
ogramiv"); |
301 functions->fGetRenderbufferParameteriv = (GrGLGetRenderbufferParameterivProc
) eglGetProcAddress("glGetRenderbufferParameteriv"); | 301 functions->fGetRenderbufferParameteriv = (GrGLGetRenderbufferParameterivProc
) eglGetProcAddress("glGetRenderbufferParameteriv"); |
302 functions->fGetShaderInfoLog = (GrGLGetShaderInfoLogProc) eglGetProcAddress(
"glGetShaderInfoLog"); | 302 functions->fGetShaderInfoLog = (GrGLGetShaderInfoLogProc) eglGetProcAddress(
"glGetShaderInfoLog"); |
303 functions->fGetShaderiv = (GrGLGetShaderivProc) eglGetProcAddress("glGetShad
eriv"); | 303 functions->fGetShaderiv = (GrGLGetShaderivProc) eglGetProcAddress("glGetShad
eriv"); |
304 functions->fGetString = (GrGLGetStringProc) eglGetProcAddress("glGetString")
; | 304 functions->fGetString = (GrGLGetStringProc) eglGetProcAddress("glGetString")
; |
305 functions->fGetStringi = (GrGLGetStringiProc) eglGetProcAddress("glGetString
i"); | 305 functions->fGetStringi = (GrGLGetStringiProc) eglGetProcAddress("glGetString
i"); |
306 functions->fGetTexLevelParameteriv = (GrGLGetTexLevelParameterivProc) eglGet
ProcAddress("glGetTexLevelParameteriv"); | 306 functions->fGetTexLevelParameteriv = (GrGLGetTexLevelParameterivProc) eglGet
ProcAddress("glGetTexLevelParameteriv"); |
307 functions->fGetUniformLocation = (GrGLGetUniformLocationProc) eglGetProcAddr
ess("glGetUniformLocation"); | 307 functions->fGetUniformLocation = (GrGLGetUniformLocationProc) eglGetProcAddr
ess("glGetUniformLocation"); |
308 functions->fLineWidth = (GrGLLineWidthProc) eglGetProcAddress("glLineWidth")
; | 308 functions->fLineWidth = (GrGLLineWidthProc) eglGetProcAddress("glLineWidth")
; |
309 functions->fLinkProgram = (GrGLLinkProgramProc) eglGetProcAddress("glLinkPro
gram"); | 309 functions->fLinkProgram = (GrGLLinkProgramProc) eglGetProcAddress("glLinkPro
gram"); |
310 functions->fLoadIdentity = (GrGLLoadIdentityProc) eglGetProcAddress("glLoadI
dentity"); | |
311 functions->fLoadMatrixf = (GrGLLoadMatrixfProc) eglGetProcAddress("glLoadMat
rixf"); | |
312 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBuffer")
; | 310 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBuffer")
; |
313 functions->fMatrixMode = (GrGLMatrixModeProc) eglGetProcAddress("glMatrixMod
e"); | 311 if (extensions.has("GL_EXT_direct_state_access")) { |
| 312 functions->fMatrixLoadf = (GrGLMatrixLoadfProc) eglGetProcAddress("glMat
rixLoadfEXT"); |
| 313 functions->fMatrixLoadIdentity = (GrGLMatrixLoadIdentityProc) eglGetProc
Address("glMatrixLoadIdentityEXT"); |
| 314 } |
314 functions->fPixelStorei = (GrGLPixelStoreiProc) eglGetProcAddress("glPixelSt
orei"); | 315 functions->fPixelStorei = (GrGLPixelStoreiProc) eglGetProcAddress("glPixelSt
orei"); |
315 functions->fQueryCounter = (GrGLQueryCounterProc) eglGetProcAddress("glQuery
Counter"); | 316 functions->fQueryCounter = (GrGLQueryCounterProc) eglGetProcAddress("glQuery
Counter"); |
316 functions->fReadBuffer = (GrGLReadBufferProc) eglGetProcAddress("glReadBuffe
r"); | 317 functions->fReadBuffer = (GrGLReadBufferProc) eglGetProcAddress("glReadBuffe
r"); |
317 functions->fReadPixels = (GrGLReadPixelsProc) eglGetProcAddress("glReadPixel
s"); | 318 functions->fReadPixels = (GrGLReadPixelsProc) eglGetProcAddress("glReadPixel
s"); |
318 functions->fRenderbufferStorage = (GrGLRenderbufferStorageProc) eglGetProcAd
dress("glRenderbufferStorage"); | 319 functions->fRenderbufferStorage = (GrGLRenderbufferStorageProc) eglGetProcAd
dress("glRenderbufferStorage"); |
319 functions->fRenderbufferStorageMultisample = (GrGLRenderbufferStorageMultisa
mpleProc) eglGetProcAddress("glRenderbufferStorageMultisample"); | 320 functions->fRenderbufferStorageMultisample = (GrGLRenderbufferStorageMultisa
mpleProc) eglGetProcAddress("glRenderbufferStorageMultisample"); |
320 functions->fScissor = (GrGLScissorProc) eglGetProcAddress("glScissor"); | 321 functions->fScissor = (GrGLScissorProc) eglGetProcAddress("glScissor"); |
321 functions->fShaderSource = (GrGLShaderSourceProc) eglGetProcAddress("glShade
rSource"); | 322 functions->fShaderSource = (GrGLShaderSourceProc) eglGetProcAddress("glShade
rSource"); |
322 functions->fStencilFunc = (GrGLStencilFuncProc) eglGetProcAddress("glStencil
Func"); | 323 functions->fStencilFunc = (GrGLStencilFuncProc) eglGetProcAddress("glStencil
Func"); |
323 functions->fStencilFuncSeparate = (GrGLStencilFuncSeparateProc) eglGetProcAd
dress("glStencilFuncSeparate"); | 324 functions->fStencilFuncSeparate = (GrGLStencilFuncSeparateProc) eglGetProcAd
dress("glStencilFuncSeparate"); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 } else if (kGL_GrGLStandard == standard) { | 443 } else if (kGL_GrGLStandard == standard) { |
443 interface = create_desktop_interface(version, extensions); | 444 interface = create_desktop_interface(version, extensions); |
444 } | 445 } |
445 | 446 |
446 if (NULL != interface) { | 447 if (NULL != interface) { |
447 interface->fExtensions.swap(&extensions); | 448 interface->fExtensions.swap(&extensions); |
448 } | 449 } |
449 | 450 |
450 return interface; | 451 return interface; |
451 } | 452 } |
OLD | NEW |