aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-01-14 09:24:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-14 09:24:09 -0800
commite5286e0b37abe4d0db67a6b3d87b2d5a12a70ab3 (patch)
tree506ce530275a41ca0561e0d00b3d535c58366b4e /src/gpu/gl/GrGLCaps.cpp
parentfe09119dd2acb43bb9986e6edeef3a480b539473 (diff)
Beginning of support for texture rectangles.
Adds support for importing a RECTANGLE texture into Skia via GrTexureProvider::wrapBackendTexture(). Tests read/writing pixels, copySurface, and clear. Does not add support for texturing from a RECTANGLE texture as the coords will be incorrectly normalized. BUG=skia:3868 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583863002 Review URL: https://codereview.chromium.org/1583863002
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 678c62abb8..ddc52cc378 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;
@@ -885,6 +891,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");