| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 NULL == fFunctions.fFramebufferTexture2D || | 220 NULL == fFunctions.fFramebufferTexture2D || |
| 221 NULL == fFunctions.fGetFramebufferAttachmentParameteriv || | 221 NULL == fFunctions.fGetFramebufferAttachmentParameteriv || |
| 222 NULL == fFunctions.fGetRenderbufferParameteriv || | 222 NULL == fFunctions.fGetRenderbufferParameteriv || |
| 223 NULL == fFunctions.fGenFramebuffers || | 223 NULL == fFunctions.fGenFramebuffers || |
| 224 NULL == fFunctions.fGenRenderbuffers || | 224 NULL == fFunctions.fGenRenderbuffers || |
| 225 NULL == fFunctions.fRenderbufferStorage) { | 225 NULL == fFunctions.fRenderbufferStorage) { |
| 226 RETURN_FALSE_INTERFACE | 226 RETURN_FALSE_INTERFACE |
| 227 } | 227 } |
| 228 | 228 |
| 229 GrGLVersion glVer = GrGLGetVersion(this); | 229 GrGLVersion glVer = GrGLGetVersion(this); |
| 230 if (GR_GL_INVALID_VER == glVer) { |
| 231 RETURN_FALSE_INTERFACE |
| 232 } |
| 230 | 233 |
| 231 // Now check that baseline ES/Desktop fns not covered above are present | 234 // Now check that baseline ES/Desktop fns not covered above are present |
| 232 // and that we have fn pointers for any advertised fExtensions that we will | 235 // and that we have fn pointers for any advertised fExtensions that we will |
| 233 // try to use. | 236 // try to use. |
| 234 | 237 |
| 235 // these functions are part of ES2, we assume they are available | 238 // these functions are part of ES2, we assume they are available |
| 236 // On the desktop we assume they are available if the extension | 239 // On the desktop we assume they are available if the extension |
| 237 // is present or GL version is high enough. | 240 // is present or GL version is high enough. |
| 238 if (kGLES_GrGLStandard == fStandard) { | 241 if (kGLES_GrGLStandard == fStandard) { |
| 239 if (NULL == fFunctions.fStencilFuncSeparate || | 242 if (NULL == fFunctions.fStencilFuncSeparate || |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 NULL == fFunctions.fMapTexSubImage2D || | 503 NULL == fFunctions.fMapTexSubImage2D || |
| 501 NULL == fFunctions.fUnmapBufferSubData || | 504 NULL == fFunctions.fUnmapBufferSubData || |
| 502 NULL == fFunctions.fUnmapTexSubImage2D) { | 505 NULL == fFunctions.fUnmapTexSubImage2D) { |
| 503 RETURN_FALSE_INTERFACE; | 506 RETURN_FALSE_INTERFACE; |
| 504 } | 507 } |
| 505 } | 508 } |
| 506 #endif | 509 #endif |
| 507 | 510 |
| 508 return true; | 511 return true; |
| 509 } | 512 } |
| OLD | NEW |