| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 if (!fExtensions.isInitialized()) { | 107 if (!fExtensions.isInitialized()) { |
| 108 RETURN_FALSE_INTERFACE | 108 RETURN_FALSE_INTERFACE |
| 109 } | 109 } |
| 110 | 110 |
| 111 // functions that are always required | 111 // functions that are always required |
| 112 if (NULL == fFunctions.fActiveTexture || | 112 if (NULL == fFunctions.fActiveTexture || |
| 113 NULL == fFunctions.fAttachShader || | 113 NULL == fFunctions.fAttachShader || |
| 114 NULL == fFunctions.fBindAttribLocation || | 114 NULL == fFunctions.fBindAttribLocation || |
| 115 NULL == fFunctions.fBindBuffer || | 115 NULL == fFunctions.fBindBuffer || |
| 116 NULL == fFunctions.fBindTexture || | 116 NULL == fFunctions.fBindTexture || |
| 117 NULL == fFunctions.fBlendColor || // -> GL >= 1.4 or extension, ES
>= 2.0 |
| 118 NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES
>= 2.0 |
| 117 NULL == fFunctions.fBlendFunc || | 119 NULL == fFunctions.fBlendFunc || |
| 118 NULL == fFunctions.fBlendColor || // -> GL >= 1.4, ES >= 2.0 or ext
ension | |
| 119 NULL == fFunctions.fBufferData || | 120 NULL == fFunctions.fBufferData || |
| 120 NULL == fFunctions.fBufferSubData || | 121 NULL == fFunctions.fBufferSubData || |
| 121 NULL == fFunctions.fClear || | 122 NULL == fFunctions.fClear || |
| 122 NULL == fFunctions.fClearColor || | 123 NULL == fFunctions.fClearColor || |
| 123 NULL == fFunctions.fClearStencil || | 124 NULL == fFunctions.fClearStencil || |
| 124 NULL == fFunctions.fColorMask || | 125 NULL == fFunctions.fColorMask || |
| 125 NULL == fFunctions.fCompileShader || | 126 NULL == fFunctions.fCompileShader || |
| 126 NULL == fFunctions.fCopyTexSubImage2D || | 127 NULL == fFunctions.fCopyTexSubImage2D || |
| 127 NULL == fFunctions.fCreateProgram || | 128 NULL == fFunctions.fCreateProgram || |
| 128 NULL == fFunctions.fCreateShader || | 129 NULL == fFunctions.fCreateShader || |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if (NULL == fFunctions.fTexStorage2D) { | 300 if (NULL == fFunctions.fTexStorage2D) { |
| 300 RETURN_FALSE_INTERFACE | 301 RETURN_FALSE_INTERFACE |
| 301 } | 302 } |
| 302 } | 303 } |
| 303 } else if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_texture_storag
e")) { | 304 } else if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_EXT_texture_storag
e")) { |
| 304 if (NULL == fFunctions.fTexStorage2D) { | 305 if (NULL == fFunctions.fTexStorage2D) { |
| 305 RETURN_FALSE_INTERFACE | 306 RETURN_FALSE_INTERFACE |
| 306 } | 307 } |
| 307 } | 308 } |
| 308 | 309 |
| 310 if (fExtensions.has("GL_KHR_blend_equation_advanced")) { |
| 311 if (NULL == fFunctions.fBlendBarrier) { |
| 312 RETURN_FALSE_INTERFACE |
| 313 } |
| 314 } |
| 315 |
| 309 if (fExtensions.has("GL_EXT_discard_framebuffer")) { | 316 if (fExtensions.has("GL_EXT_discard_framebuffer")) { |
| 310 // FIXME: Remove this once Chromium is updated to provide this function | 317 // FIXME: Remove this once Chromium is updated to provide this function |
| 311 #if 0 | 318 #if 0 |
| 312 if (NULL == fFunctions.fDiscardFramebuffer) { | 319 if (NULL == fFunctions.fDiscardFramebuffer) { |
| 313 RETURN_FALSE_INTERFACE | 320 RETURN_FALSE_INTERFACE |
| 314 } | 321 } |
| 315 #endif | 322 #endif |
| 316 } | 323 } |
| 317 | 324 |
| 318 // FBO MSAA | 325 // FBO MSAA |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 NULL == fFunctions.fStencilThenCoverStrokePathInstanced || | 507 NULL == fFunctions.fStencilThenCoverStrokePathInstanced || |
| 501 NULL == fFunctions.fProgramPathFragmentInputGen || | 508 NULL == fFunctions.fProgramPathFragmentInputGen || |
| 502 NULL == fFunctions.fPathMemoryGlyphIndexArray) { | 509 NULL == fFunctions.fPathMemoryGlyphIndexArray) { |
| 503 RETURN_FALSE_INTERFACE | 510 RETURN_FALSE_INTERFACE |
| 504 } | 511 } |
| 505 } | 512 } |
| 506 } | 513 } |
| 507 | 514 |
| 508 return true; | 515 return true; |
| 509 } | 516 } |
| OLD | NEW |