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

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1583863002: Beginning of support for texture rectangles. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 0c2ed73d7cb237597d1f99f19d2767028209531d..bc49c20b35a86e65f95846b0a8c597916da67560 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -42,6 +42,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fIsCoreProfile = false;
fBindFragDataLocationSupport = false;
fExternalTextureSupport = false;
+ fRectangleTextureSupport = false;
fTextureSwizzleSupport = false;
fSRGBWriteControl = false;
fRGBA8888PixelsOpsAreSlow = false;
@@ -219,6 +220,11 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
}
}
+ if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 2)) ||
+ ctxInfo.hasExtension("GL_ARB_texture_rectangle")) {
+ fRectangleTextureSupport = true;
+ }
+
if (kGL_GrGLStandard == standard) {
if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_swizzle")) {
fTextureSwizzleSupport = true;
@@ -900,6 +906,7 @@ SkString GrGLCaps::dump() const {
r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO"));
r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSupport ? "YES" : "NO"));
r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES" : "NO"));
+ r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES" : "NO"));
r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO"));
r.append("Configs\n-------\n");
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698