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

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

Issue 1093323005: Revert of 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.
118 NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES >= 2.0 120 NULL == fFunctions.fBlendEquation || // -> GL >= 1.4 or extension, ES >= 2.0
121 #endif
119 NULL == fFunctions.fBlendFunc || 122 NULL == fFunctions.fBlendFunc ||
120 NULL == fFunctions.fBufferData || 123 NULL == fFunctions.fBufferData ||
121 NULL == fFunctions.fBufferSubData || 124 NULL == fFunctions.fBufferSubData ||
122 NULL == fFunctions.fClear || 125 NULL == fFunctions.fClear ||
123 NULL == fFunctions.fClearColor || 126 NULL == fFunctions.fClearColor ||
124 NULL == fFunctions.fClearStencil || 127 NULL == fFunctions.fClearStencil ||
125 NULL == fFunctions.fColorMask || 128 NULL == fFunctions.fColorMask ||
126 NULL == fFunctions.fCompileShader || 129 NULL == fFunctions.fCompileShader ||
127 NULL == fFunctions.fCopyTexSubImage2D || 130 NULL == fFunctions.fCopyTexSubImage2D ||
128 NULL == fFunctions.fCreateProgram || 131 NULL == fFunctions.fCreateProgram ||
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 RETURN_FALSE_INTERFACE 271 RETURN_FALSE_INTERFACE
269 } 272 }
270 } 273 }
271 } 274 }
272 275
273 // optional function on desktop before 1.3 276 // optional function on desktop before 1.3
274 if (kGL_GrGLStandard != fStandard || 277 if (kGL_GrGLStandard != fStandard ||
275 (glVer >= GR_GL_VER(1,3)) || 278 (glVer >= GR_GL_VER(1,3)) ||
276 fExtensions.has("GL_ARB_texture_compression")) { 279 fExtensions.has("GL_ARB_texture_compression")) {
277 if (NULL == fFunctions.fCompressedTexImage2D 280 if (NULL == fFunctions.fCompressedTexImage2D
281 #if 0
278 || NULL == fFunctions.fCompressedTexSubImage2D 282 || NULL == fFunctions.fCompressedTexSubImage2D
283 #endif
279 ) { 284 ) {
280 RETURN_FALSE_INTERFACE 285 RETURN_FALSE_INTERFACE
281 } 286 }
282 } 287 }
283 288
284 // part of desktop GL, but not ES 289 // part of desktop GL, but not ES
285 if (kGL_GrGLStandard == fStandard && 290 if (kGL_GrGLStandard == fStandard &&
286 (NULL == fFunctions.fGetTexLevelParameteriv || 291 (NULL == fFunctions.fGetTexLevelParameteriv ||
287 NULL == fFunctions.fDrawBuffer || 292 NULL == fFunctions.fDrawBuffer ||
288 NULL == fFunctions.fReadBuffer)) { 293 NULL == fFunctions.fReadBuffer)) {
(...skipping 24 matching lines...) Expand all
313 if (NULL == fFunctions.fTextureBarrier) { 318 if (NULL == fFunctions.fTextureBarrier) {
314 RETURN_FALSE_INTERFACE 319 RETURN_FALSE_INTERFACE
315 } 320 }
316 } 321 }
317 } else if (fExtensions.has("GL_NV_texture_barrier")) { 322 } else if (fExtensions.has("GL_NV_texture_barrier")) {
318 if (NULL == fFunctions.fTextureBarrier) { 323 if (NULL == fFunctions.fTextureBarrier) {
319 RETURN_FALSE_INTERFACE 324 RETURN_FALSE_INTERFACE
320 } 325 }
321 } 326 }
322 327
328 // FIXME: Remove this once Chromium is updated to provide this function
329 #if 0
323 if (fExtensions.has("GL_KHR_blend_equation_advanced") || 330 if (fExtensions.has("GL_KHR_blend_equation_advanced") ||
324 fExtensions.has("GL_NV_blend_equation_advanced")) { 331 fExtensions.has("GL_NV_blend_equation_advanced")) {
325 if (NULL == fFunctions.fBlendBarrier) { 332 if (NULL == fFunctions.fBlendBarrier) {
326 RETURN_FALSE_INTERFACE 333 RETURN_FALSE_INTERFACE
327 } 334 }
328 } 335 }
336 #endif
329 337
330 if (fExtensions.has("GL_EXT_discard_framebuffer")) { 338 if (fExtensions.has("GL_EXT_discard_framebuffer")) {
339 // FIXME: Remove this once Chromium is updated to provide this function
340 #if 0
331 if (NULL == fFunctions.fDiscardFramebuffer) { 341 if (NULL == fFunctions.fDiscardFramebuffer) {
332 RETURN_FALSE_INTERFACE 342 RETURN_FALSE_INTERFACE
333 } 343 }
344 #endif
334 } 345 }
335 346
336 // FBO MSAA 347 // FBO MSAA
337 if (kGL_GrGLStandard == fStandard) { 348 if (kGL_GrGLStandard == fStandard) {
338 // GL 3.0 and the ARB extension have multisample + blit 349 // GL 3.0 and the ARB extension have multisample + blit
339 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_objec t")) { 350 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_objec t")) {
340 if (NULL == fFunctions.fRenderbufferStorageMultisample || 351 if (NULL == fFunctions.fRenderbufferStorageMultisample ||
341 NULL == fFunctions.fBlitFramebuffer) { 352 NULL == fFunctions.fBlitFramebuffer) {
342 RETURN_FALSE_INTERFACE 353 RETURN_FALSE_INTERFACE
343 } 354 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 if ((kGL_GrGLStandard == fStandard && 483 if ((kGL_GrGLStandard == fStandard &&
473 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_q uery"))) || 484 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_q uery"))) ||
474 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) { 485 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) {
475 if (NULL == fFunctions.fGetProgramResourceLocation) { 486 if (NULL == fFunctions.fGetProgramResourceLocation) {
476 RETURN_FALSE_INTERFACE 487 RETURN_FALSE_INTERFACE
477 } 488 }
478 } 489 }
479 490
480 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) || 491 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) ||
481 fExtensions.has("GL_ARB_ES2_compatibility")) { 492 fExtensions.has("GL_ARB_ES2_compatibility")) {
493 #if 0 // Enable this once Chrome gives us the function ptr
482 if (NULL == fFunctions.fGetShaderPrecisionFormat) { 494 if (NULL == fFunctions.fGetShaderPrecisionFormat) {
483 RETURN_FALSE_INTERFACE 495 RETURN_FALSE_INTERFACE
484 } 496 }
497 #endif
485 } 498 }
486 499
487 if (fExtensions.has("GL_NV_path_rendering")) { 500 if (fExtensions.has("GL_NV_path_rendering")) {
488 if (NULL == fFunctions.fPathCommands || 501 if (NULL == fFunctions.fPathCommands ||
489 NULL == fFunctions.fPathCoords || 502 NULL == fFunctions.fPathCoords ||
490 NULL == fFunctions.fPathParameteri || 503 NULL == fFunctions.fPathParameteri ||
491 NULL == fFunctions.fPathParameterf || 504 NULL == fFunctions.fPathParameterf ||
492 NULL == fFunctions.fGenPaths || 505 NULL == fFunctions.fGenPaths ||
493 NULL == fFunctions.fDeletePaths || 506 NULL == fFunctions.fDeletePaths ||
494 NULL == fFunctions.fIsPath || 507 NULL == fFunctions.fIsPath ||
(...skipping 27 matching lines...) Expand all
522 } 535 }
523 536
524 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { 537 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) {
525 if (NULL == fFunctions.fCoverageModulation) { 538 if (NULL == fFunctions.fCoverageModulation) {
526 RETURN_FALSE_INTERFACE 539 RETURN_FALSE_INTERFACE
527 } 540 }
528 } 541 }
529 542
530 return true; 543 return true;
531 } 544 }
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