Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: src/gpu/gl/GrGLInterface.cpp

Issue 1039693004: Add tokens and entry points for KHR_blend_equation_advanced (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Disable fBlendEquation validation Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 #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
121 #endif
117 NULL == fFunctions.fBlendFunc || 122 NULL == fFunctions.fBlendFunc ||
118 NULL == fFunctions.fBlendColor || // -> GL >= 1.4, ES >= 2.0 or ext ension
119 NULL == fFunctions.fBufferData || 123 NULL == fFunctions.fBufferData ||
120 NULL == fFunctions.fBufferSubData || 124 NULL == fFunctions.fBufferSubData ||
121 NULL == fFunctions.fClear || 125 NULL == fFunctions.fClear ||
122 NULL == fFunctions.fClearColor || 126 NULL == fFunctions.fClearColor ||
123 NULL == fFunctions.fClearStencil || 127 NULL == fFunctions.fClearStencil ||
124 NULL == fFunctions.fColorMask || 128 NULL == fFunctions.fColorMask ||
125 NULL == fFunctions.fCompileShader || 129 NULL == fFunctions.fCompileShader ||
126 NULL == fFunctions.fCopyTexSubImage2D || 130 NULL == fFunctions.fCopyTexSubImage2D ||
127 NULL == fFunctions.fCreateProgram || 131 NULL == fFunctions.fCreateProgram ||
128 NULL == fFunctions.fCreateShader || 132 NULL == fFunctions.fCreateShader ||
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 if (NULL == fFunctions.fTextureBarrier) { 318 if (NULL == fFunctions.fTextureBarrier) {
315 RETURN_FALSE_INTERFACE 319 RETURN_FALSE_INTERFACE
316 } 320 }
317 } 321 }
318 } else if (fExtensions.has("GL_NV_texture_barrier")) { 322 } else if (fExtensions.has("GL_NV_texture_barrier")) {
319 if (NULL == fFunctions.fTextureBarrier) { 323 if (NULL == fFunctions.fTextureBarrier) {
320 RETURN_FALSE_INTERFACE 324 RETURN_FALSE_INTERFACE
321 } 325 }
322 } 326 }
323 327
328 if (fExtensions.has("GL_KHR_blend_equation_advanced") ||
329 fExtensions.has("GL_NV_blend_equation_advanced")) {
330 if (NULL == fFunctions.fBlendBarrier) {
331 RETURN_FALSE_INTERFACE
332 }
333 }
334
324 if (fExtensions.has("GL_EXT_discard_framebuffer")) { 335 if (fExtensions.has("GL_EXT_discard_framebuffer")) {
325 // FIXME: Remove this once Chromium is updated to provide this function 336 // FIXME: Remove this once Chromium is updated to provide this function
326 #if 0 337 #if 0
327 if (NULL == fFunctions.fDiscardFramebuffer) { 338 if (NULL == fFunctions.fDiscardFramebuffer) {
328 RETURN_FALSE_INTERFACE 339 RETURN_FALSE_INTERFACE
329 } 340 }
330 #endif 341 #endif
331 } 342 }
332 343
333 // FBO MSAA 344 // FBO MSAA
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 } 532 }
522 533
523 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { 534 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) {
524 if (NULL == fFunctions.fCoverageModulation) { 535 if (NULL == fFunctions.fCoverageModulation) {
525 RETURN_FALSE_INTERFACE 536 RETURN_FALSE_INTERFACE
526 } 537 }
527 } 538 }
528 539
529 return true; 540 return true;
530 } 541 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698