diff options
Diffstat (limited to 'include/gpu/GrCoordTransform.h')
-rw-r--r-- | include/gpu/GrCoordTransform.h | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/include/gpu/GrCoordTransform.h b/include/gpu/GrCoordTransform.h index 5725a69433..54c21b7472 100644 --- a/include/gpu/GrCoordTransform.h +++ b/include/gpu/GrCoordTransform.h @@ -8,12 +8,10 @@ #ifndef GrCoordTransform_DEFINED #define GrCoordTransform_DEFINED -#include "GrProcessor.h" #include "SkMatrix.h" #include "GrTexture.h" -#include "GrTypes.h" -#include "GrShaderVar.h" +class GrResourceProvider; class GrTextureProxy; /** @@ -25,52 +23,47 @@ public: GrCoordTransform() : fTexture(nullptr) , fNormalize(false) - , fReverseY(false) - , fPrecision(kDefault_GrSLPrecision) { + , fReverseY(false) { SkDEBUGCODE(fInProcessor = false); } /** - * Create a transformation that maps [0, 1] to a proxy's boundaries. The precision is inferred - * from the proxy size and filter. The proxy origin also implies whether a y-reversal should - * be performed. + * Create a transformation that maps [0, 1] to a proxy's boundaries. The proxy origin also + * implies whether a y-reversal should be performed. */ - GrCoordTransform(GrResourceProvider* resourceProvider, GrTextureProxy* proxy, - GrSamplerParams::FilterMode filter) { + GrCoordTransform(GrResourceProvider* resourceProvider, GrTextureProxy* proxy) { SkASSERT(proxy); SkDEBUGCODE(fInProcessor = false); - this->reset(resourceProvider, SkMatrix::I(), proxy, filter); + this->reset(resourceProvider, SkMatrix::I(), proxy); } /** - * Create a transformation from a matrix. The precision is inferred from the proxy size and - * filter. The proxy origin also implies whether a y-reversal should be performed. + * Create a transformation from a matrix. The proxy origin also implies whether a y-reversal + * should be performed. */ GrCoordTransform(GrResourceProvider* resourceProvider, const SkMatrix& m, - GrTextureProxy* proxy, GrSamplerParams::FilterMode filter) { + GrTextureProxy* proxy) { SkASSERT(proxy); SkDEBUGCODE(fInProcessor = false); - this->reset(resourceProvider, m, proxy, filter); + this->reset(resourceProvider, m, proxy); } /** * Create a transformation that applies the matrix to a coord set. */ - GrCoordTransform(const SkMatrix& m, GrSLPrecision precision = kDefault_GrSLPrecision) { + GrCoordTransform(const SkMatrix& m) { SkDEBUGCODE(fInProcessor = false); - this->reset(m, precision); + this->reset(m); } - void reset(GrResourceProvider*, const SkMatrix&, GrTextureProxy*, - GrSamplerParams::FilterMode filter, bool normalize = true); + void reset(GrResourceProvider*, const SkMatrix&, GrTextureProxy*, bool normalize = true); - void reset(const SkMatrix& m, GrSLPrecision precision = kDefault_GrSLPrecision) { + void reset(const SkMatrix& m) { SkASSERT(!fInProcessor); fMatrix = m; fTexture = nullptr; fNormalize = false; fReverseY = false; - fPrecision = precision; } GrCoordTransform& operator= (const GrCoordTransform& that) { @@ -79,7 +72,6 @@ public: fTexture = that.fTexture; fNormalize = that.fNormalize; fReverseY = that.fReverseY; - fPrecision = that.fPrecision; return *this; } @@ -112,7 +104,6 @@ public: const GrTexture* texture() const { return fTexture; } bool normalize() const { return fNormalize; } bool reverseY() const { return fReverseY; } - GrSLPrecision precision() const { return kHigh_GrSLPrecision; } private: // The textures' effect is to optionally normalize the final matrix, so a blind @@ -124,7 +115,6 @@ private: const GrTexture* fTexture; bool fNormalize; bool fReverseY; - GrSLPrecision fPrecision; typedef SkNoncopyable INHERITED; #ifdef SK_DEBUG |