| 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 | |
| 119 NULL == fFunctions.fBlendFunc || | 117 NULL == fFunctions.fBlendFunc || |
| 118 NULL == fFunctions.fBlendColor || // -> GL >= 1.4, ES >= 2.0 or ext
ension |
| 120 NULL == fFunctions.fBufferData || | 119 NULL == fFunctions.fBufferData || |
| 121 NULL == fFunctions.fBufferSubData || | 120 NULL == fFunctions.fBufferSubData || |
| 122 NULL == fFunctions.fClear || | 121 NULL == fFunctions.fClear || |
| 123 NULL == fFunctions.fClearColor || | 122 NULL == fFunctions.fClearColor || |
| 124 NULL == fFunctions.fClearStencil || | 123 NULL == fFunctions.fClearStencil || |
| 125 NULL == fFunctions.fColorMask || | 124 NULL == fFunctions.fColorMask || |
| 126 NULL == fFunctions.fCompileShader || | 125 NULL == fFunctions.fCompileShader || |
| 127 NULL == fFunctions.fCopyTexSubImage2D || | 126 NULL == fFunctions.fCopyTexSubImage2D || |
| 128 NULL == fFunctions.fCreateProgram || | 127 NULL == fFunctions.fCreateProgram || |
| 129 NULL == fFunctions.fCreateShader || | 128 NULL == fFunctions.fCreateShader || |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 if (NULL == fFunctions.fTextureBarrier) { | 314 if (NULL == fFunctions.fTextureBarrier) { |
| 316 RETURN_FALSE_INTERFACE | 315 RETURN_FALSE_INTERFACE |
| 317 } | 316 } |
| 318 } | 317 } |
| 319 } else if (fExtensions.has("GL_NV_texture_barrier")) { | 318 } else if (fExtensions.has("GL_NV_texture_barrier")) { |
| 320 if (NULL == fFunctions.fTextureBarrier) { | 319 if (NULL == fFunctions.fTextureBarrier) { |
| 321 RETURN_FALSE_INTERFACE | 320 RETURN_FALSE_INTERFACE |
| 322 } | 321 } |
| 323 } | 322 } |
| 324 | 323 |
| 325 if (fExtensions.has("GL_KHR_blend_equation_advanced") || | |
| 326 fExtensions.has("GL_NV_blend_equation_advanced")) { | |
| 327 if (NULL == fFunctions.fBlendBarrier) { | |
| 328 RETURN_FALSE_INTERFACE | |
| 329 } | |
| 330 } | |
| 331 | |
| 332 if (fExtensions.has("GL_EXT_discard_framebuffer")) { | 324 if (fExtensions.has("GL_EXT_discard_framebuffer")) { |
| 333 // FIXME: Remove this once Chromium is updated to provide this function | 325 // FIXME: Remove this once Chromium is updated to provide this function |
| 334 #if 0 | 326 #if 0 |
| 335 if (NULL == fFunctions.fDiscardFramebuffer) { | 327 if (NULL == fFunctions.fDiscardFramebuffer) { |
| 336 RETURN_FALSE_INTERFACE | 328 RETURN_FALSE_INTERFACE |
| 337 } | 329 } |
| 338 #endif | 330 #endif |
| 339 } | 331 } |
| 340 | 332 |
| 341 // FBO MSAA | 333 // FBO MSAA |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 } | 521 } |
| 530 | 522 |
| 531 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { | 523 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { |
| 532 if (NULL == fFunctions.fCoverageModulation) { | 524 if (NULL == fFunctions.fCoverageModulation) { |
| 533 RETURN_FALSE_INTERFACE | 525 RETURN_FALSE_INTERFACE |
| 534 } | 526 } |
| 535 } | 527 } |
| 536 | 528 |
| 537 return true; | 529 return true; |
| 538 } | 530 } |
| OLD | NEW |