aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTexturePriv.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-04 11:54:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-04 16:25:25 +0000
commit4d53c44aa6e8e0d1b6537f83e4287e5a1423ac75 (patch)
treeca7e88b141ef8667921b1ade269e7e2c838b13c0 /src/gpu/GrTexturePriv.h
parent9598c2fbc29ddb5e5d86c5b82b401b62cee02775 (diff)
Limit GL_TEXTURE_RECTANGLE filtering to bilinear.
Adds a clamp for GrTexture filtering that can be set by a subclass at construction. The clamping is performed by GrTextureParams. GrGLTexture limits filtering to bilinear for rectangle and external textures. Also moves samplerType() to GrTexturePriv from GrTexture. BUG=skia:5932 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4352 Change-Id: I1f023d4f4133e7eb393367580c0558257e56c8db Reviewed-on: https://skia-review.googlesource.com/4352 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrTexturePriv.h')
-rw-r--r--src/gpu/GrTexturePriv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrTexturePriv.h b/src/gpu/GrTexturePriv.h
index c4e6538d16..c4c185560e 100644
--- a/src/gpu/GrTexturePriv.h
+++ b/src/gpu/GrTexturePriv.h
@@ -49,6 +49,11 @@ public:
return fTexture->fMaxMipMapLevel;
}
+ GrSLType samplerType() const { return fTexture->fSamplerType; }
+
+ /** The filter used is clamped to this value in GrTextureAccess. */
+ GrTextureParams::FilterMode highestFilterMode() const { return fTexture->fHighestFilterMode; }
+
void setGammaTreatment(SkSourceGammaTreatment gammaTreatment) const {
fTexture->fGammaTreatment = gammaTreatment;
}