From ce4d04ae8eace6ba53ff8b8c8d8f4a2e6af4e59f Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Sun, 6 Nov 2016 12:46:37 +0000 Subject: Revert "Limit GL_TEXTURE_RECTANGLE filtering to bilinear." This reverts commit 4d53c44aa6e8e0d1b6537f83e4287e5a1423ac75. Reason for revert: Depends on https://skia-review.googlesource.com/c/4383/ which I need to revert. Original change's 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=4352 > > Change-Id: I1f023d4f4133e7eb393367580c0558257e56c8db > Reviewed-on: https://skia-review.googlesource.com/4352 > Commit-Queue: Brian Salomon > Reviewed-by: Chris Dalton > TBR=bsalomon@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=662630 Change-Id: I012aa208594ccff0bb81bece8110a38e1f83ae00 Reviewed-on: https://skia-review.googlesource.com/4444 Commit-Queue: Ben Wagner Reviewed-by: Ben Wagner --- include/gpu/GrTexture.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/gpu') diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h index 8fa0db9587..211f1937da 100644 --- a/include/gpu/GrTexture.h +++ b/include/gpu/GrTexture.h @@ -10,16 +10,17 @@ #define GrTexture_DEFINED #include "GrSurface.h" -#include "GrTextureParams.h" #include "SkPoint.h" #include "SkRefCnt.h" +class GrTextureParams; class GrTexturePriv; class GrTexture : virtual public GrSurface { public: GrTexture* asTexture() override { return this; } const GrTexture* asTexture() const override { return this; } + GrSLType samplerType() const { return fSamplerType; } /** * Return the native ID or handle to the texture, depending on the @@ -45,8 +46,7 @@ public: inline const GrTexturePriv texturePriv() const; protected: - GrTexture(GrGpu*, const GrSurfaceDesc&, GrSLType samplerType, - GrTextureParams::FilterMode highestFilterMode, bool wasMipMapDataProvided); + GrTexture(GrGpu*, const GrSurfaceDesc&, GrSLType, bool wasMipMapDataProvided); void validateDesc() const; @@ -61,11 +61,11 @@ private: kValid_MipMapsStatus }; - GrSLType fSamplerType; - GrTextureParams::FilterMode fHighestFilterMode; - MipMapsStatus fMipMapsStatus; - int fMaxMipMapLevel; - SkSourceGammaTreatment fGammaTreatment; + GrSLType fSamplerType; + MipMapsStatus fMipMapsStatus; + int fMaxMipMapLevel; + SkSourceGammaTreatment fGammaTreatment; + friend class GrTexturePriv; typedef GrSurface INHERITED; -- cgit v1.2.3