| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 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 | 7 |
| 8 | 8 |
| 9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
| 10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 GrGLVersion glVer = GrGLGetVersion(this); | 144 GrGLVersion glVer = GrGLGetVersion(this); |
| 145 | 145 |
| 146 // Now check that baseline ES/Desktop fns not covered above are present | 146 // Now check that baseline ES/Desktop fns not covered above are present |
| 147 // and that we have fn pointers for any advertised extensions that we will | 147 // and that we have fn pointers for any advertised extensions that we will |
| 148 // try to use. | 148 // try to use. |
| 149 | 149 |
| 150 // these functions are part of ES2, we assume they are available | 150 // these functions are part of ES2, we assume they are available |
| 151 // On the desktop we assume they are available if the extension | 151 // On the desktop we assume they are available if the extension |
| 152 // is present or GL version is high enough. | 152 // is present or GL version is high enough. |
| 153 if (kES2_GrGLBinding == binding) { | 153 if (kES_GrGLBinding == binding) { |
| 154 if (NULL == fStencilFuncSeparate || | 154 if (NULL == fStencilFuncSeparate || |
| 155 NULL == fStencilMaskSeparate || | 155 NULL == fStencilMaskSeparate || |
| 156 NULL == fStencilOpSeparate) { | 156 NULL == fStencilOpSeparate) { |
| 157 return false; | 157 return false; |
| 158 } | 158 } |
| 159 } else if (kDesktop_GrGLBinding == binding) { | 159 } else if (kDesktop_GrGLBinding == binding) { |
| 160 | 160 |
| 161 if (glVer >= GR_GL_VER(2,0)) { | 161 if (glVer >= GR_GL_VER(2,0)) { |
| 162 if (NULL == fStencilFuncSeparate || | 162 if (NULL == fStencilFuncSeparate || |
| 163 NULL == fStencilMaskSeparate || | 163 NULL == fStencilMaskSeparate || |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 if (NULL == fBindVertexArray || | 382 if (NULL == fBindVertexArray || |
| 383 NULL == fDeleteVertexArrays || | 383 NULL == fDeleteVertexArrays || |
| 384 NULL == fGenVertexArrays) { | 384 NULL == fGenVertexArrays) { |
| 385 return false; | 385 return false; |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 | 389 |
| 390 return true; | 390 return true; |
| 391 } | 391 } |
| OLD | NEW |