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

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

Issue 1784063003: Add caps and GL API for buffer texture (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_precision
Patch Set: Created 4 years, 9 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 // glVertexAttribIPointer was added in version 3.0 of both desktop and ES. 419 // glVertexAttribIPointer was added in version 3.0 of both desktop and ES.
420 if (glVer >= GR_GL_VER(3, 0)) { 420 if (glVer >= GR_GL_VER(3, 0)) {
421 if (NULL == fFunctions.fVertexAttribIPointer) { 421 if (NULL == fFunctions.fVertexAttribIPointer) {
422 RETURN_FALSE_INTERFACE 422 RETURN_FALSE_INTERFACE
423 } 423 }
424 } 424 }
425 425
426 if (kGL_GrGLStandard == fStandard) { 426 if (kGL_GrGLStandard == fStandard) {
427 if (glVer >= GR_GL_VER(3,1)) {
428 if (nullptr == fFunctions.fTexBuffer) {
429 RETURN_FALSE_INTERFACE;
430 }
431 }
432 } else {
433 if (glVer >= GR_GL_VER(3,2) || fExtensions.has("GL_OES_texture_buffer") ||
434 fExtensions.has("GL_EXT_texture_buffer")) {
435 if (nullptr == fFunctions.fTexBuffer) {
436 RETURN_FALSE_INTERFACE;
437 }
438 }
439 }
440
441 if (kGL_GrGLStandard == fStandard) {
427 if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_obj ect")) { 442 if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_obj ect")) {
428 if (nullptr == fFunctions.fBindVertexArray || 443 if (nullptr == fFunctions.fBindVertexArray ||
429 nullptr == fFunctions.fDeleteVertexArrays || 444 nullptr == fFunctions.fDeleteVertexArrays ||
430 nullptr == fFunctions.fGenVertexArrays) { 445 nullptr == fFunctions.fGenVertexArrays) {
431 RETURN_FALSE_INTERFACE 446 RETURN_FALSE_INTERFACE
432 } 447 }
433 } 448 }
434 } else { 449 } else {
435 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_OES_vertex_array_obje ct")) { 450 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_OES_vertex_array_obje ct")) {
436 if (nullptr == fFunctions.fBindVertexArray || 451 if (nullptr == fFunctions.fBindVertexArray ||
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 nullptr == fFunctions.fDisableVertexArrayAttrib || 754 nullptr == fFunctions.fDisableVertexArrayAttrib ||
740 nullptr == fFunctions.fGetVertexArrayIntegerv || 755 nullptr == fFunctions.fGetVertexArrayIntegerv ||
741 nullptr == fFunctions.fGetVertexArrayPointerv || 756 nullptr == fFunctions.fGetVertexArrayPointerv ||
742 nullptr == fFunctions.fGetVertexArrayIntegeri_v || 757 nullptr == fFunctions.fGetVertexArrayIntegeri_v ||
743 nullptr == fFunctions.fGetVertexArrayPointeri_v || 758 nullptr == fFunctions.fGetVertexArrayPointeri_v ||
744 nullptr == fFunctions.fMapNamedBufferRange || 759 nullptr == fFunctions.fMapNamedBufferRange ||
745 nullptr == fFunctions.fFlushMappedNamedBufferRange) { 760 nullptr == fFunctions.fFlushMappedNamedBufferRange) {
746 RETURN_FALSE_INTERFACE 761 RETURN_FALSE_INTERFACE
747 } 762 }
748 } 763 }
764 if (glVer >= GR_GL_VER(3,1)) {
765 if (nullptr == fFunctions.fTextureBuffer) {
766 RETURN_FALSE_INTERFACE;
767 }
768 }
749 } 769 }
750 770
751 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) || 771 if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
752 fExtensions.has("GL_KHR_debug")) { 772 fExtensions.has("GL_KHR_debug")) {
753 if (nullptr == fFunctions.fDebugMessageControl || 773 if (nullptr == fFunctions.fDebugMessageControl ||
754 nullptr == fFunctions.fDebugMessageInsert || 774 nullptr == fFunctions.fDebugMessageInsert ||
755 nullptr == fFunctions.fDebugMessageCallback || 775 nullptr == fFunctions.fDebugMessageCallback ||
756 nullptr == fFunctions.fGetDebugMessageLog || 776 nullptr == fFunctions.fGetDebugMessageLog ||
757 nullptr == fFunctions.fPushDebugGroup || 777 nullptr == fFunctions.fPushDebugGroup ||
758 nullptr == fFunctions.fPopDebugGroup || 778 nullptr == fFunctions.fPopDebugGroup ||
759 nullptr == fFunctions.fObjectLabel) { 779 nullptr == fFunctions.fObjectLabel) {
760 RETURN_FALSE_INTERFACE 780 RETURN_FALSE_INTERFACE
761 } 781 }
762 } 782 }
763 783
764 if (fExtensions.has("EGL_KHR_image") || fExtensions.has("EGL_KHR_image_base" )) { 784 if (fExtensions.has("EGL_KHR_image") || fExtensions.has("EGL_KHR_image_base" )) {
765 if (nullptr == fFunctions.fEGLCreateImage || 785 if (nullptr == fFunctions.fEGLCreateImage ||
766 nullptr == fFunctions.fEGLDestroyImage) { 786 nullptr == fFunctions.fEGLDestroyImage) {
767 RETURN_FALSE_INTERFACE 787 RETURN_FALSE_INTERFACE
768 } 788 }
769 } 789 }
770 790
771 return true; 791 return true;
772 } 792 }
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