| 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/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 GrGLExtensions extensions; | 34 GrGLExtensions extensions; |
| 35 if (!extensions.init(kDesktop_GrGLBinding, glGetString, glGetStringi, gl
GetIntegerv)) { | 35 if (!extensions.init(kDesktop_GrGLBinding, glGetString, glGetStringi, gl
GetIntegerv)) { |
| 36 return NULL; | 36 return NULL; |
| 37 } | 37 } |
| 38 | 38 |
| 39 if (glVer < GR_GL_VER(1,5)) { | 39 if (glVer < GR_GL_VER(1,5)) { |
| 40 // We must have array and element_array buffer objects. | 40 // We must have array and element_array buffer objects. |
| 41 return NULL; | 41 return NULL; |
| 42 } | 42 } |
| 43 | 43 |
| 44 GrGLInterface* interface = new GrGLInterface(); | 44 GrGLInterface* interface = SkNEW(GrGLInterface()); |
| 45 | 45 |
| 46 interface->fActiveTexture = glActiveTexture; | 46 interface->fActiveTexture = glActiveTexture; |
| 47 GR_GL_GET_PROC(AttachShader); | 47 GR_GL_GET_PROC(AttachShader); |
| 48 GR_GL_GET_PROC(BindAttribLocation); | 48 GR_GL_GET_PROC(BindAttribLocation); |
| 49 GR_GL_GET_PROC(BindBuffer); | 49 GR_GL_GET_PROC(BindBuffer); |
| 50 GR_GL_GET_PROC(BindFragDataLocation); | 50 GR_GL_GET_PROC(BindFragDataLocation); |
| 51 GR_GL_GET_PROC(BeginQuery); | 51 GR_GL_GET_PROC(BeginQuery); |
| 52 interface->fBindTexture = glBindTexture; | 52 interface->fBindTexture = glBindTexture; |
| 53 interface->fBlendFunc = glBlendFunc; | 53 interface->fBlendFunc = glBlendFunc; |
| 54 | 54 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 GR_GL_GET_PROC_SUFFIX(PointAlongPath, NV); | 275 GR_GL_GET_PROC_SUFFIX(PointAlongPath, NV); |
| 276 } | 276 } |
| 277 | 277 |
| 278 interface->fBindingsExported = kDesktop_GrGLBinding; | 278 interface->fBindingsExported = kDesktop_GrGLBinding; |
| 279 | 279 |
| 280 return interface; | 280 return interface; |
| 281 } else { | 281 } else { |
| 282 return NULL; | 282 return NULL; |
| 283 } | 283 } |
| 284 } | 284 } |
| OLD | NEW |