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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 117 NULL == fFunctions.fBlendColor || // -> GL >= 1.4 or extension, ES
>= 2.0 |
118 #if 0 | |
119 // TODO: Re-enable validation for fBlendEquation when Chrome has it hook
ed up. | |
120 NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES
>= 2.0 | 118 NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES
>= 2.0 |
121 #endif | |
122 NULL == fFunctions.fBlendFunc || | 119 NULL == fFunctions.fBlendFunc || |
123 NULL == fFunctions.fBufferData || | 120 NULL == fFunctions.fBufferData || |
124 NULL == fFunctions.fBufferSubData || | 121 NULL == fFunctions.fBufferSubData || |
125 NULL == fFunctions.fClear || | 122 NULL == fFunctions.fClear || |
126 NULL == fFunctions.fClearColor || | 123 NULL == fFunctions.fClearColor || |
127 NULL == fFunctions.fClearStencil || | 124 NULL == fFunctions.fClearStencil || |
128 NULL == fFunctions.fColorMask || | 125 NULL == fFunctions.fColorMask || |
129 NULL == fFunctions.fCompileShader || | 126 NULL == fFunctions.fCompileShader || |
130 NULL == fFunctions.fCopyTexSubImage2D || | 127 NULL == fFunctions.fCopyTexSubImage2D || |
131 NULL == fFunctions.fCreateProgram || | 128 NULL == fFunctions.fCreateProgram || |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 if (NULL == fFunctions.fTextureBarrier) { | 315 if (NULL == fFunctions.fTextureBarrier) { |
319 RETURN_FALSE_INTERFACE | 316 RETURN_FALSE_INTERFACE |
320 } | 317 } |
321 } | 318 } |
322 } else if (fExtensions.has("GL_NV_texture_barrier")) { | 319 } else if (fExtensions.has("GL_NV_texture_barrier")) { |
323 if (NULL == fFunctions.fTextureBarrier) { | 320 if (NULL == fFunctions.fTextureBarrier) { |
324 RETURN_FALSE_INTERFACE | 321 RETURN_FALSE_INTERFACE |
325 } | 322 } |
326 } | 323 } |
327 | 324 |
328 // FIXME: Remove this once Chromium is updated to provide this function | |
329 #if 0 | |
330 if (fExtensions.has("GL_KHR_blend_equation_advanced") || | 325 if (fExtensions.has("GL_KHR_blend_equation_advanced") || |
331 fExtensions.has("GL_NV_blend_equation_advanced")) { | 326 fExtensions.has("GL_NV_blend_equation_advanced")) { |
332 if (NULL == fFunctions.fBlendBarrier) { | 327 if (NULL == fFunctions.fBlendBarrier) { |
333 RETURN_FALSE_INTERFACE | 328 RETURN_FALSE_INTERFACE |
334 } | 329 } |
335 } | 330 } |
336 #endif | |
337 | 331 |
338 if (fExtensions.has("GL_EXT_discard_framebuffer")) { | 332 if (fExtensions.has("GL_EXT_discard_framebuffer")) { |
339 // FIXME: Remove this once Chromium is updated to provide this function | 333 // FIXME: Remove this once Chromium is updated to provide this function |
340 #if 0 | 334 #if 0 |
341 if (NULL == fFunctions.fDiscardFramebuffer) { | 335 if (NULL == fFunctions.fDiscardFramebuffer) { |
342 RETURN_FALSE_INTERFACE | 336 RETURN_FALSE_INTERFACE |
343 } | 337 } |
344 #endif | 338 #endif |
345 } | 339 } |
346 | 340 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 } | 529 } |
536 | 530 |
537 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { | 531 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { |
538 if (NULL == fFunctions.fCoverageModulation) { | 532 if (NULL == fFunctions.fCoverageModulation) { |
539 RETURN_FALSE_INTERFACE | 533 RETURN_FALSE_INTERFACE |
540 } | 534 } |
541 } | 535 } |
542 | 536 |
543 return true; | 537 return true; |
544 } | 538 } |
OLD | NEW |