Move GrTextureParams from GrSamplerState to GrTextureAccess

Review URL: https://codereview.appspot.com/6496135/



git-svn-id: http://skia.googlecode.com/svn/trunk@5582 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index b2e9205..e96eb47 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -41,6 +41,14 @@
     : fTextureAccess(texture) {
 }
 
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, bool bilerp)
+    : fTextureAccess(texture, bilerp) {
+}
+
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, const GrTextureParams& params)
+    : fTextureAccess(texture, params) {
+}
+
 GrSingleTextureEffect::~GrSingleTextureEffect() {
 }
 
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 2090196..4d0a40f 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -18,7 +18,14 @@
 class GrSingleTextureEffect : public GrCustomStage {
 
 public:
+    /** Uses default texture params (unfiltered, clamp) */
     GrSingleTextureEffect(GrTexture* texture);
+
+    /** Uses default tile mode (clamp) */
+    GrSingleTextureEffect(GrTexture* texture, bool bilerp);
+
+    GrSingleTextureEffect(GrTexture* texture, const GrTextureParams&);
+
     virtual ~GrSingleTextureEffect();
 
     virtual int numTextures() const SK_OVERRIDE;
diff --git a/src/gpu/effects/GrTextureDomainEffect.cpp b/src/gpu/effects/GrTextureDomainEffect.cpp
index 279e481..c00f40f 100644
--- a/src/gpu/effects/GrTextureDomainEffect.cpp
+++ b/src/gpu/effects/GrTextureDomainEffect.cpp
@@ -91,11 +91,18 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture, GrRect domain)
+GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture, const GrRect& domain)
     : GrSingleTextureEffect(texture)
     , fTextureDomain(domain) {
 }
 
+GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
+                                             const GrRect& domain,
+                                             const GrTextureParams& params)
+    : GrSingleTextureEffect(texture, params)
+    , fTextureDomain(domain) {
+}
+
 GrTextureDomainEffect::~GrTextureDomainEffect() {
 
 }
diff --git a/src/gpu/effects/GrTextureDomainEffect.h b/src/gpu/effects/GrTextureDomainEffect.h
index 559398e..872d57d 100644
--- a/src/gpu/effects/GrTextureDomainEffect.h
+++ b/src/gpu/effects/GrTextureDomainEffect.h
@@ -20,8 +20,11 @@
 class GrTextureDomainEffect : public GrSingleTextureEffect {
 
 public:
+    /** Uses default texture params (no filter, clamp) */
+    GrTextureDomainEffect(GrTexture*, const GrRect& domain);
 
-    GrTextureDomainEffect(GrTexture*, GrRect domain);
+    GrTextureDomainEffect(GrTexture*, const GrRect& domain, const GrTextureParams& params);
+
     virtual ~GrTextureDomainEffect();
 
     static const char* Name() { return "TextureDomain"; }