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

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

Issue 1100413003: Remove validation exceptions in GrGLInterface. These are all now set by Chromium. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | no next file » | 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 RETURN_FALSE_INTERFACE 268 RETURN_FALSE_INTERFACE
272 } 269 }
273 } 270 }
274 } 271 }
275 272
276 // optional function on desktop before 1.3 273 // optional function on desktop before 1.3
277 if (kGL_GrGLStandard != fStandard || 274 if (kGL_GrGLStandard != fStandard ||
278 (glVer >= GR_GL_VER(1,3)) || 275 (glVer >= GR_GL_VER(1,3)) ||
279 fExtensions.has("GL_ARB_texture_compression")) { 276 fExtensions.has("GL_ARB_texture_compression")) {
280 if (NULL == fFunctions.fCompressedTexImage2D 277 if (NULL == fFunctions.fCompressedTexImage2D
281 #if 0
282 || NULL == fFunctions.fCompressedTexSubImage2D 278 || NULL == fFunctions.fCompressedTexSubImage2D
283 #endif
284 ) { 279 ) {
285 RETURN_FALSE_INTERFACE 280 RETURN_FALSE_INTERFACE
286 } 281 }
287 } 282 }
288 283
289 // part of desktop GL, but not ES 284 // part of desktop GL, but not ES
290 if (kGL_GrGLStandard == fStandard && 285 if (kGL_GrGLStandard == fStandard &&
291 (NULL == fFunctions.fGetTexLevelParameteriv || 286 (NULL == fFunctions.fGetTexLevelParameteriv ||
292 NULL == fFunctions.fDrawBuffer || 287 NULL == fFunctions.fDrawBuffer ||
293 NULL == fFunctions.fReadBuffer)) { 288 NULL == fFunctions.fReadBuffer)) {
(...skipping 24 matching lines...) Expand all
318 if (NULL == fFunctions.fTextureBarrier) { 313 if (NULL == fFunctions.fTextureBarrier) {
319 RETURN_FALSE_INTERFACE 314 RETURN_FALSE_INTERFACE
320 } 315 }
321 } 316 }
322 } else if (fExtensions.has("GL_NV_texture_barrier")) { 317 } else if (fExtensions.has("GL_NV_texture_barrier")) {
323 if (NULL == fFunctions.fTextureBarrier) { 318 if (NULL == fFunctions.fTextureBarrier) {
324 RETURN_FALSE_INTERFACE 319 RETURN_FALSE_INTERFACE
325 } 320 }
326 } 321 }
327 322
328 // FIXME: Remove this once Chromium is updated to provide this function
329 #if 0
330 if (fExtensions.has("GL_KHR_blend_equation_advanced") || 323 if (fExtensions.has("GL_KHR_blend_equation_advanced") ||
331 fExtensions.has("GL_NV_blend_equation_advanced")) { 324 fExtensions.has("GL_NV_blend_equation_advanced")) {
332 if (NULL == fFunctions.fBlendBarrier) { 325 if (NULL == fFunctions.fBlendBarrier) {
333 RETURN_FALSE_INTERFACE 326 RETURN_FALSE_INTERFACE
334 } 327 }
335 } 328 }
336 #endif
337 329
338 if (fExtensions.has("GL_EXT_discard_framebuffer")) { 330 if (fExtensions.has("GL_EXT_discard_framebuffer")) {
339 // FIXME: Remove this once Chromium is updated to provide this function
340 #if 0
341 if (NULL == fFunctions.fDiscardFramebuffer) { 331 if (NULL == fFunctions.fDiscardFramebuffer) {
342 RETURN_FALSE_INTERFACE 332 RETURN_FALSE_INTERFACE
343 } 333 }
344 #endif
345 } 334 }
346 335
347 // FBO MSAA 336 // FBO MSAA
348 if (kGL_GrGLStandard == fStandard) { 337 if (kGL_GrGLStandard == fStandard) {
349 // GL 3.0 and the ARB extension have multisample + blit 338 // GL 3.0 and the ARB extension have multisample + blit
350 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_objec t")) { 339 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_objec t")) {
351 if (NULL == fFunctions.fRenderbufferStorageMultisample || 340 if (NULL == fFunctions.fRenderbufferStorageMultisample ||
352 NULL == fFunctions.fBlitFramebuffer) { 341 NULL == fFunctions.fBlitFramebuffer) {
353 RETURN_FALSE_INTERFACE 342 RETURN_FALSE_INTERFACE
354 } 343 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 if ((kGL_GrGLStandard == fStandard && 472 if ((kGL_GrGLStandard == fStandard &&
484 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_q uery"))) || 473 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_q uery"))) ||
485 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) { 474 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) {
486 if (NULL == fFunctions.fGetProgramResourceLocation) { 475 if (NULL == fFunctions.fGetProgramResourceLocation) {
487 RETURN_FALSE_INTERFACE 476 RETURN_FALSE_INTERFACE
488 } 477 }
489 } 478 }
490 479
491 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) || 480 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) ||
492 fExtensions.has("GL_ARB_ES2_compatibility")) { 481 fExtensions.has("GL_ARB_ES2_compatibility")) {
493 #if 0 // Enable this once Chrome gives us the function ptr
494 if (NULL == fFunctions.fGetShaderPrecisionFormat) { 482 if (NULL == fFunctions.fGetShaderPrecisionFormat) {
495 RETURN_FALSE_INTERFACE 483 RETURN_FALSE_INTERFACE
496 } 484 }
497 #endif
498 } 485 }
499 486
500 if (fExtensions.has("GL_NV_path_rendering")) { 487 if (fExtensions.has("GL_NV_path_rendering")) {
501 if (NULL == fFunctions.fPathCommands || 488 if (NULL == fFunctions.fPathCommands ||
502 NULL == fFunctions.fPathCoords || 489 NULL == fFunctions.fPathCoords ||
503 NULL == fFunctions.fPathParameteri || 490 NULL == fFunctions.fPathParameteri ||
504 NULL == fFunctions.fPathParameterf || 491 NULL == fFunctions.fPathParameterf ||
505 NULL == fFunctions.fGenPaths || 492 NULL == fFunctions.fGenPaths ||
506 NULL == fFunctions.fDeletePaths || 493 NULL == fFunctions.fDeletePaths ||
507 NULL == fFunctions.fIsPath || 494 NULL == fFunctions.fIsPath ||
(...skipping 27 matching lines...) Expand all
535 } 522 }
536 523
537 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { 524 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) {
538 if (NULL == fFunctions.fCoverageModulation) { 525 if (NULL == fFunctions.fCoverageModulation) {
539 RETURN_FALSE_INTERFACE 526 RETURN_FALSE_INTERFACE
540 } 527 }
541 } 528 }
542 529
543 return true; 530 return true;
544 } 531 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698