Rename GrTextureParams to GrSamplerParams
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965
Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671
Reviewed-on: https://skia-review.googlesource.com/4965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp
index da7bb2f..a41b200 100644
--- a/src/image/SkImageShader.cpp
+++ b/src/image/SkImageShader.cpp
@@ -207,10 +207,10 @@
// This completely ignores the complexity of the drawVertices case where explicit local coords
// are provided by the caller.
bool doBicubic;
- GrTextureParams::FilterMode textureFilterMode =
+ GrSamplerParams::FilterMode textureFilterMode =
GrSkFilterQualityToGrFilterMode(args.fFilterQuality, *args.fViewMatrix, this->getLocalMatrix(),
&doBicubic);
- GrTextureParams params(tm, textureFilterMode);
+ GrSamplerParams params(tm, textureFilterMode);
sk_sp<GrTexture> texture(as_IB(fImage)->asTextureRef(args.fContext, params, args.fColorMode));
if (!texture) {
return nullptr;
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 7fbe97d..09ceb57 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -18,7 +18,7 @@
#include <new>
-class GrTextureParams;
+class GrSamplerParams;
class SkImageCacherator;
enum {
@@ -55,7 +55,7 @@
virtual bool getROPixels(SkBitmap*, CachingHint = kAllow_CachingHint) const = 0;
// Caller must call unref when they are done.
- virtual GrTexture* asTextureRef(GrContext*, const GrTextureParams&,
+ virtual GrTexture* asTextureRef(GrContext*, const GrSamplerParams&,
SkDestinationSurfaceColorMode) const = 0;
virtual sk_sp<SkImage> onMakeSubset(const SkIRect&) const = 0;
diff --git a/src/image/SkImage_Generator.cpp b/src/image/SkImage_Generator.cpp
index 03dda91..82f395f 100644
--- a/src/image/SkImage_Generator.cpp
+++ b/src/image/SkImage_Generator.cpp
@@ -31,7 +31,7 @@
SkData* onRefEncoded(GrContext*) const override;
sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
bool getROPixels(SkBitmap*, CachingHint) const override;
- GrTexture* asTextureRef(GrContext*, const GrTextureParams&,
+ GrTexture* asTextureRef(GrContext*, const GrSamplerParams&,
SkDestinationSurfaceColorMode) const override;
bool onIsLazyGenerated() const override { return true; }
@@ -74,7 +74,7 @@
return fCache.lockAsBitmap(bitmap, this, chint);
}
-GrTexture* SkImage_Generator::asTextureRef(GrContext* ctx, const GrTextureParams& params,
+GrTexture* SkImage_Generator::asTextureRef(GrContext* ctx, const GrSamplerParams& params,
SkDestinationSurfaceColorMode colorMode) const {
return fCache.lockAsTexture(ctx, params, colorMode, this);
}
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index c75e36b..84c7b10 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -85,7 +85,7 @@
return true;
}
-GrTexture* SkImage_Gpu::asTextureRef(GrContext* ctx, const GrTextureParams& params,
+GrTexture* SkImage_Gpu::asTextureRef(GrContext* ctx, const GrSamplerParams& params,
SkDestinationSurfaceColorMode colorMode) const {
GrTextureAdjuster adjuster(this->peekTexture(), this->alphaType(), this->bounds(), this->uniqueID(),
this->onImageInfo().colorSpace());
@@ -299,7 +299,7 @@
static sk_sp<SkImage> create_image_from_maker(GrTextureMaker* maker, SkAlphaType at, uint32_t id) {
sk_sp<GrTexture> texture(
- maker->refTextureForParams(GrTextureParams::ClampNoFilter(),
+ maker->refTextureForParams(GrSamplerParams::ClampNoFilter(),
SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware));
if (!texture) {
return nullptr;
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 13c1e30..19e2944 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -39,7 +39,7 @@
}
bool getROPixels(SkBitmap*, CachingHint) const override;
- GrTexture* asTextureRef(GrContext* ctx, const GrTextureParams& params,
+ GrTexture* asTextureRef(GrContext* ctx, const GrSamplerParams& params,
SkDestinationSurfaceColorMode) const override;
sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index be86a2a..a2b12e4 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -89,7 +89,7 @@
SkData* onRefEncoded(GrContext*) const override;
bool getROPixels(SkBitmap*, CachingHint) const override;
- GrTexture* asTextureRef(GrContext*, const GrTextureParams&,
+ GrTexture* asTextureRef(GrContext*, const GrSamplerParams&,
SkDestinationSurfaceColorMode) const override;
sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
@@ -197,7 +197,7 @@
return true;
}
-GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, const GrTextureParams& params,
+GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, const GrSamplerParams& params,
SkDestinationSurfaceColorMode colorMode) const {
#if SK_SUPPORT_GPU
if (!ctx) {
@@ -239,7 +239,7 @@
SkASSERT(fPinnedCount == 0);
SkASSERT(fPinnedUniqueID == 0);
fPinnedTexture.reset(
- GrRefCachedBitmapTexture(ctx, fBitmap, GrTextureParams::ClampNoFilter(),
+ GrRefCachedBitmapTexture(ctx, fBitmap, GrSamplerParams::ClampNoFilter(),
SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware));
if (!fPinnedTexture) {
return false;