Revert "Revert "Limit GL_TEXTURE_RECTANGLE filtering to bilinear.""
This reverts commit ce4d04ae8eace6ba53ff8b8c8d8f4a2e6af4e59f.
BUG=skia:5932
Original CL description:
>
>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=4455
Change-Id: I4a9f4abac44979cb900f5b04fe741524eade66b1
Reviewed-on: https://skia-review.googlesource.com/4455
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index de1135a..6fc1580 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -70,9 +70,10 @@
//////////////////////////////////////////////////////////////////////////////
GrTexture::GrTexture(GrGpu* gpu, const GrSurfaceDesc& desc, GrSLType samplerType,
- bool wasMipMapDataProvided)
+ GrTextureParams::FilterMode highestFilterMode, bool wasMipMapDataProvided)
: INHERITED(gpu, desc)
, fSamplerType(samplerType)
+ , fHighestFilterMode(highestFilterMode)
// Gamma treatment is explicitly set after creation via GrTexturePriv
, fGammaTreatment(SkSourceGammaTreatment::kIgnore) {
if (wasMipMapDataProvided) {