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

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

Issue 2158983002: Remove guards in GrGLInterface::validate() for functions that Chromium used to not provide. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 if (fExtensions.has("GL_KHR_blend_equation_advanced") || 314 if (fExtensions.has("GL_KHR_blend_equation_advanced") ||
315 fExtensions.has("GL_NV_blend_equation_advanced")) { 315 fExtensions.has("GL_NV_blend_equation_advanced")) {
316 if (nullptr == fFunctions.fBlendBarrier) { 316 if (nullptr == fFunctions.fBlendBarrier) {
317 RETURN_FALSE_INTERFACE 317 RETURN_FALSE_INTERFACE
318 } 318 }
319 } 319 }
320 320
321 if (fExtensions.has("GL_EXT_discard_framebuffer")) { 321 if (fExtensions.has("GL_EXT_discard_framebuffer")) {
322 // FIXME: Remove this once Chromium is updated to provide this function
323 #if 0
324 if (nullptr == fFunctions.fDiscardFramebuffer) { 322 if (nullptr == fFunctions.fDiscardFramebuffer) {
325 RETURN_FALSE_INTERFACE 323 RETURN_FALSE_INTERFACE
326 } 324 }
327 #endif
328 } 325 }
329 326
330 // FBO MSAA 327 // FBO MSAA
331 if (kGL_GrGLStandard == fStandard) { 328 if (kGL_GrGLStandard == fStandard) {
332 // GL 3.0 and the ARB extension have multisample + blit 329 // GL 3.0 and the ARB extension have multisample + blit
333 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_objec t")) { 330 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_ARB_framebuffer_objec t")) {
334 if (nullptr == fFunctions.fRenderbufferStorageMultisample || 331 if (nullptr == fFunctions.fRenderbufferStorageMultisample ||
335 nullptr == fFunctions.fBlitFramebuffer) { 332 nullptr == fFunctions.fBlitFramebuffer) {
336 RETURN_FALSE_INTERFACE 333 RETURN_FALSE_INTERFACE
337 } 334 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 if ((kGL_GrGLStandard == fStandard && 500 if ((kGL_GrGLStandard == fStandard &&
504 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_q uery"))) || 501 (glVer >= GR_GL_VER(4,3) || fExtensions.has("GL_ARB_program_interface_q uery"))) ||
505 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) { 502 (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) {
506 if (nullptr == fFunctions.fGetProgramResourceLocation) { 503 if (nullptr == fFunctions.fGetProgramResourceLocation) {
507 RETURN_FALSE_INTERFACE 504 RETURN_FALSE_INTERFACE
508 } 505 }
509 } 506 }
510 507
511 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) || 508 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) ||
512 fExtensions.has("GL_ARB_ES2_compatibility")) { 509 fExtensions.has("GL_ARB_ES2_compatibility")) {
513 #if 0 // Enable this once Chrome gives us the function ptr
514 if (nullptr == fFunctions.fGetShaderPrecisionFormat) { 510 if (nullptr == fFunctions.fGetShaderPrecisionFormat) {
515 RETURN_FALSE_INTERFACE 511 RETURN_FALSE_INTERFACE
516 } 512 }
517 #endif
518 } 513 }
519 514
520 if (fExtensions.has("GL_NV_path_rendering") || fExtensions.has("GL_CHROMIUM_ path_rendering")) { 515 if (fExtensions.has("GL_NV_path_rendering") || fExtensions.has("GL_CHROMIUM_ path_rendering")) {
521 if (nullptr == fFunctions.fMatrixLoadf || 516 if (nullptr == fFunctions.fMatrixLoadf ||
522 nullptr == fFunctions.fMatrixLoadIdentity || 517 nullptr == fFunctions.fMatrixLoadIdentity ||
523 nullptr == fFunctions.fPathCommands || 518 nullptr == fFunctions.fPathCommands ||
524 nullptr == fFunctions.fPathParameteri || 519 nullptr == fFunctions.fPathParameteri ||
525 nullptr == fFunctions.fPathParameterf || 520 nullptr == fFunctions.fPathParameterf ||
526 nullptr == fFunctions.fGenPaths || 521 nullptr == fFunctions.fGenPaths ||
527 nullptr == fFunctions.fDeletePaths || 522 nullptr == fFunctions.fDeletePaths ||
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 782
788 if (fExtensions.has("EGL_KHR_image") || fExtensions.has("EGL_KHR_image_base" )) { 783 if (fExtensions.has("EGL_KHR_image") || fExtensions.has("EGL_KHR_image_base" )) {
789 if (nullptr == fFunctions.fEGLCreateImage || 784 if (nullptr == fFunctions.fEGLCreateImage ||
790 nullptr == fFunctions.fEGLDestroyImage) { 785 nullptr == fFunctions.fEGLDestroyImage) {
791 RETURN_FALSE_INTERFACE 786 RETURN_FALSE_INTERFACE
792 } 787 }
793 } 788 }
794 789
795 return true; 790 return true;
796 } 791 }
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