aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-17 15:17:07 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-17 21:13:18 +0000
commit514baff8be7f71111aa7bfb9b099a096b31e16ec (patch)
tree635854f47c42f30de48e739b42eb85aba2f1efb3 /src/gpu/effects
parent7776029b54cc8c21fd6e0c1aa5a3b30e8bb52939 (diff)
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>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrBicubicEffect.cpp16
-rw-r--r--src/gpu/effects/GrBicubicEffect.h2
-rw-r--r--src/gpu/effects/GrBitmapTextGeoProc.cpp10
-rw-r--r--src/gpu/effects/GrBitmapTextGeoProc.h6
-rw-r--r--src/gpu/effects/GrDistanceFieldGeoProc.cpp18
-rw-r--r--src/gpu/effects/GrDistanceFieldGeoProc.h20
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp4
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.h12
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.cpp6
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.h4
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp10
-rw-r--r--src/gpu/effects/GrTextureDomain.h4
-rw-r--r--src/gpu/effects/GrYUVEffect.cpp10
13 files changed, 61 insertions, 61 deletions
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 335ef161fc..4ea358ea10 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -153,7 +153,7 @@ GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
const SkMatrix &matrix,
const SkShader::TileMode tileModes[2])
: INHERITED(texture, nullptr, matrix,
- GrTextureParams(tileModes, GrTextureParams::kNone_FilterMode))
+ GrSamplerParams(tileModes, GrSamplerParams::kNone_FilterMode))
, fDomain(GrTextureDomain::IgnoredDomain())
, fColorSpaceXform(std::move(colorSpaceXform)) {
this->initClassID<GrBicubicEffect>();
@@ -166,7 +166,7 @@ GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
const SkMatrix &matrix,
const SkRect& domain)
: INHERITED(texture, nullptr, matrix,
- GrTextureParams(SkShader::kClamp_TileMode, GrTextureParams::kNone_FilterMode))
+ GrSamplerParams(SkShader::kClamp_TileMode, GrSamplerParams::kNone_FilterMode))
, fDomain(domain, GrTextureDomain::kClamp_Mode)
, fColorSpaceXform(std::move(colorSpaceXform)) {
this->initClassID<GrBicubicEffect>();
@@ -212,9 +212,9 @@ sk_sp<GrFragmentProcessor> GrBicubicEffect::TestCreate(GrProcessorTestData* d) {
//////////////////////////////////////////////////////////////////////////////
bool GrBicubicEffect::ShouldUseBicubic(const SkMatrix& matrix,
- GrTextureParams::FilterMode* filterMode) {
+ GrSamplerParams::FilterMode* filterMode) {
if (matrix.isIdentity()) {
- *filterMode = GrTextureParams::kNone_FilterMode;
+ *filterMode = GrSamplerParams::kNone_FilterMode;
return false;
}
@@ -222,22 +222,22 @@ bool GrBicubicEffect::ShouldUseBicubic(const SkMatrix& matrix,
if (!matrix.getMinMaxScales(scales) || scales[0] < SK_Scalar1) {
// Bicubic doesn't handle arbitrary minimization well, as src texels can be skipped
// entirely,
- *filterMode = GrTextureParams::kMipMap_FilterMode;
+ *filterMode = GrSamplerParams::kMipMap_FilterMode;
return false;
}
// At this point if scales[1] == SK_Scalar1 then the matrix doesn't do any scaling.
if (scales[1] == SK_Scalar1) {
if (matrix.rectStaysRect() && SkScalarIsInt(matrix.getTranslateX()) &&
SkScalarIsInt(matrix.getTranslateY())) {
- *filterMode = GrTextureParams::kNone_FilterMode;
+ *filterMode = GrSamplerParams::kNone_FilterMode;
} else {
// Use bilerp to handle rotation or fractional translation.
- *filterMode = GrTextureParams::kBilerp_FilterMode;
+ *filterMode = GrSamplerParams::kBilerp_FilterMode;
}
return false;
}
// When we use the bicubic filtering effect each sample is read from the texture using
// nearest neighbor sampling.
- *filterMode = GrTextureParams::kNone_FilterMode;
+ *filterMode = GrSamplerParams::kNone_FilterMode;
return true;
}
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 58bb068d5f..61ce7eb08a 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -93,7 +93,7 @@ public:
* kNearest).
*/
static bool ShouldUseBicubic(const SkMatrix& localCoordsToDevice,
- GrTextureParams::FilterMode* filterMode);
+ GrSamplerParams::FilterMode* filterMode);
private:
GrBicubicEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkScalar coefficients[16],
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 11c7982713..76dc123275 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -125,7 +125,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, GrTexture* texture,
- const GrTextureParams& params, GrMaskFormat format,
+ const GrSamplerParams& params, GrMaskFormat format,
const SkMatrix& localMatrix, bool usesLocalCoords)
: fColor(color)
, fLocalMatrix(localMatrix)
@@ -160,8 +160,8 @@ GrGLSLPrimitiveProcessor* GrBitmapTextGeoProc::createGLSLInstance(const GrGLSLCa
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrBitmapTextGeoProc);
sk_sp<GrGeometryProcessor> GrBitmapTextGeoProc::TestCreate(GrProcessorTestData* d) {
- int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
- GrProcessorUnitTest::kAlphaTextureIdx;
+ int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
+ : GrProcessorUnitTest::kAlphaTextureIdx;
static const SkShader::TileMode kTileModes[] = {
SkShader::kClamp_TileMode,
SkShader::kRepeat_TileMode,
@@ -171,8 +171,8 @@ sk_sp<GrGeometryProcessor> GrBitmapTextGeoProc::TestCreate(GrProcessorTestData*
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
};
- GrTextureParams params(tileModes, d->fRandom->nextBool() ? GrTextureParams::kBilerp_FilterMode :
- GrTextureParams::kNone_FilterMode);
+ GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode
+ : GrSamplerParams::kNone_FilterMode);
GrMaskFormat format = kARGB_GrMaskFormat; // init to avoid warning
switch (d->fRandom->nextULessThan(3)) {
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h
index 7e2df0a6e7..c8fc99b020 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.h
+++ b/src/gpu/effects/GrBitmapTextGeoProc.h
@@ -16,12 +16,12 @@ class GrInvariantOutput;
/**
* The output color of this effect is a modulation of the input color and a sample from a texture.
- * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
+ * It allows explicit specification of the filtering and wrap modes (GrSamplerParams). The input
* coords are a custom attribute.
*/
class GrBitmapTextGeoProc : public GrGeometryProcessor {
public:
- static sk_sp<GrGeometryProcessor> Make(GrColor color, GrTexture* tex, const GrTextureParams& p,
+ static sk_sp<GrGeometryProcessor> Make(GrColor color, GrTexture* tex, const GrSamplerParams& p,
GrMaskFormat format, const SkMatrix& localMatrix,
bool usesLocalCoords) {
return sk_sp<GrGeometryProcessor>(
@@ -47,7 +47,7 @@ public:
GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps) const override;
private:
- GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& params,
+ GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrSamplerParams& params,
GrMaskFormat format, const SkMatrix& localMatrix, bool usesLocalCoords);
GrColor fColor;
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 8de6cd26a4..d5476d495c 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -230,7 +230,7 @@ private:
GrDistanceFieldA8TextGeoProc::GrDistanceFieldA8TextGeoProc(GrColor color,
const SkMatrix& viewMatrix,
GrTexture* texture,
- const GrTextureParams& params,
+ const GrSamplerParams& params,
#ifdef SK_GAMMA_APPLY_TO_A8
float distanceAdjust,
#endif
@@ -280,8 +280,8 @@ sk_sp<GrGeometryProcessor> GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorT
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
};
- GrTextureParams params(tileModes, d->fRandom->nextBool() ? GrTextureParams::kBilerp_FilterMode :
- GrTextureParams::kNone_FilterMode);
+ GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode
+ : GrSamplerParams::kNone_FilterMode);
uint32_t flags = 0;
flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0;
@@ -479,7 +479,7 @@ GrDistanceFieldPathGeoProc::GrDistanceFieldPathGeoProc(
GrColor color,
const SkMatrix& viewMatrix,
GrTexture* texture,
- const GrTextureParams& params,
+ const GrSamplerParams& params,
uint32_t flags,
bool usesLocalCoords)
: fColor(color)
@@ -522,8 +522,8 @@ sk_sp<GrGeometryProcessor> GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTes
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
};
- GrTextureParams params(tileModes, d->fRandom->nextBool() ? GrTextureParams::kBilerp_FilterMode
- : GrTextureParams::kNone_FilterMode);
+ GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode
+ : GrSamplerParams::kNone_FilterMode);
uint32_t flags = 0;
flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0;
@@ -781,7 +781,7 @@ private:
GrDistanceFieldLCDTextGeoProc::GrDistanceFieldLCDTextGeoProc(
GrColor color, const SkMatrix& viewMatrix,
- GrTexture* texture, const GrTextureParams& params,
+ GrTexture* texture, const GrSamplerParams& params,
DistanceAdjust distanceAdjust,
uint32_t flags, bool usesLocalCoords)
: fColor(color)
@@ -825,8 +825,8 @@ sk_sp<GrGeometryProcessor> GrDistanceFieldLCDTextGeoProc::TestCreate(GrProcessor
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
};
- GrTextureParams params(tileModes, d->fRandom->nextBool() ? GrTextureParams::kBilerp_FilterMode :
- GrTextureParams::kNone_FilterMode);
+ GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode
+ : GrSamplerParams::kNone_FilterMode);
DistanceAdjust wa = { 0.0f, 0.1f, -0.1f };
uint32_t flags = kUseLCD_DistanceFieldEffectFlag;
flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0;
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h
index 68e0a24911..880c4e18dc 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.h
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.h
@@ -43,14 +43,14 @@ enum GrDistanceFieldEffectFlags {
/**
* The output color of this effect is a modulation of the input color and a sample from a
* distance field texture (using a smoothed step function near 0.5).
- * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
+ * It allows explicit specification of the filtering and wrap modes (GrSamplerParams). The input
* coords are a custom attribute. Gamma correction is handled via a texture LUT.
*/
class GrDistanceFieldA8TextGeoProc : public GrGeometryProcessor {
public:
#ifdef SK_GAMMA_APPLY_TO_A8
static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix,
- GrTexture* tex, const GrTextureParams& params,
+ GrTexture* tex, const GrSamplerParams& params,
float lum, uint32_t flags, bool usesLocalCoords) {
return sk_sp<GrGeometryProcessor>(
new GrDistanceFieldA8TextGeoProc(color, viewMatrix, tex, params, lum, flags,
@@ -58,7 +58,7 @@ public:
}
#else
static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix,
- GrTexture* tex, const GrTextureParams& params,
+ GrTexture* tex, const GrSamplerParams& params,
uint32_t flags, bool usesLocalCoords) {
return sk_sp<GrGeometryProcessor>(
new GrDistanceFieldA8TextGeoProc(color, viewMatrix, tex, params, flags,
@@ -88,7 +88,7 @@ public:
private:
GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix,
- GrTexture* texture, const GrTextureParams& params,
+ GrTexture* texture, const GrSamplerParams& params,
#ifdef SK_GAMMA_APPLY_TO_A8
float distanceAdjust,
#endif
@@ -115,13 +115,13 @@ private:
/**
* The output color of this effect is a modulation of the input color and a sample from a
* distance field texture (using a smoothed step function near 0.5).
-* It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
+* It allows explicit specification of the filtering and wrap modes (GrSamplerParams). The input
* coords are a custom attribute. No gamma correct blending is applied. Used for paths only.
*/
class GrDistanceFieldPathGeoProc : public GrGeometryProcessor {
public:
static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix,
- GrTexture* tex, const GrTextureParams& params,
+ GrTexture* tex, const GrSamplerParams& params,
uint32_t flags, bool usesLocalCoords) {
return sk_sp<GrGeometryProcessor>(
new GrDistanceFieldPathGeoProc(color, viewMatrix, tex, params, flags, usesLocalCoords));
@@ -146,7 +146,7 @@ public:
private:
GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* texture,
- const GrTextureParams& params, uint32_t flags,
+ const GrSamplerParams& params, uint32_t flags,
bool usesLocalCoords);
GrColor fColor;
@@ -166,7 +166,7 @@ private:
/**
* The output color of this effect is a modulation of the input color and samples from a
* distance field texture (using a smoothed step function near 0.5), adjusted for LCD displays.
- * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
+ * It allows explicit specification of the filtering and wrap modes (GrSamplerParams). The input
* coords are a custom attribute. Gamma correction is handled via a texture LUT.
*/
class GrDistanceFieldLCDTextGeoProc : public GrGeometryProcessor {
@@ -187,7 +187,7 @@ public:
};
static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix,
- GrTexture* tex, const GrTextureParams& params,
+ GrTexture* tex, const GrSamplerParams& params,
DistanceAdjust distanceAdjust, uint32_t flags,
bool usesLocalCoords) {
return sk_sp<GrGeometryProcessor>(
@@ -215,7 +215,7 @@ public:
private:
GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix,
- GrTexture* texture, const GrTextureParams& params,
+ GrTexture* texture, const GrSamplerParams& params,
DistanceAdjust wa, uint32_t flags,
bool usesLocalCoords);
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index beb64d582d..1c213a759d 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -81,8 +81,8 @@ sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(GrProcessorTestData
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))],
};
- GrTextureParams params(tileModes, d->fRandom->nextBool() ? GrTextureParams::kBilerp_FilterMode :
- GrTextureParams::kNone_FilterMode);
+ GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode :
+ GrSamplerParams::kNone_FilterMode);
const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
auto colorSpaceXform = GrTest::TestColorXform(d->fRandom);
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index fced736183..ccb590e297 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -14,7 +14,7 @@ class GrInvariantOutput;
/**
* The output color of this effect is a modulation of the input color and a sample from a texture.
- * It allows explicit specification of the filtering and wrap modes (GrTextureParams) and accepts
+ * It allows explicit specification of the filtering and wrap modes (GrSamplerParams) and accepts
* a matrix that is used to compute texture coordinates from local coordinates.
*/
class GrSimpleTextureEffect : public GrSingleTextureEffect {
@@ -25,14 +25,14 @@ public:
const SkMatrix& matrix) {
return sk_sp<GrFragmentProcessor>(
new GrSimpleTextureEffect(tex, std::move(colorSpaceXform), matrix,
- GrTextureParams::kNone_FilterMode));
+ GrSamplerParams::kNone_FilterMode));
}
/* clamp mode */
static sk_sp<GrFragmentProcessor> Make(GrTexture* tex,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
- GrTextureParams::FilterMode filterMode) {
+ GrSamplerParams::FilterMode filterMode) {
return sk_sp<GrFragmentProcessor>(
new GrSimpleTextureEffect(tex, std::move(colorSpaceXform), matrix, filterMode));
}
@@ -40,7 +40,7 @@ public:
static sk_sp<GrFragmentProcessor> Make(GrTexture* tex,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
- const GrTextureParams& p) {
+ const GrSamplerParams& p) {
return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(tex, std::move(colorSpaceXform),
matrix, p));
}
@@ -53,7 +53,7 @@ private:
GrSimpleTextureEffect(GrTexture* texture,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
- GrTextureParams::FilterMode filterMode)
+ GrSamplerParams::FilterMode filterMode)
: GrSingleTextureEffect(texture, std::move(colorSpaceXform), matrix, filterMode) {
this->initClassID<GrSimpleTextureEffect>();
}
@@ -61,7 +61,7 @@ private:
GrSimpleTextureEffect(GrTexture* texture,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
- const GrTextureParams& params)
+ const GrSamplerParams& params)
: GrSingleTextureEffect(texture, std::move(colorSpaceXform), matrix, params) {
this->initClassID<GrSimpleTextureEffect>();
}
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index 929275e3ad..425e367178 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -10,7 +10,7 @@
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& m)
- : fCoordTransform(m, texture, GrTextureParams::kNone_FilterMode)
+ : fCoordTransform(m, texture, GrSamplerParams::kNone_FilterMode)
, fTextureSampler(texture)
, fColorSpaceXform(std::move(colorSpaceXform)) {
this->addCoordTransform(&fCoordTransform);
@@ -20,7 +20,7 @@ GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& m,
- GrTextureParams::FilterMode filterMode)
+ GrSamplerParams::FilterMode filterMode)
: fCoordTransform(m, texture, filterMode)
, fTextureSampler(texture, filterMode)
, fColorSpaceXform(std::move(colorSpaceXform)) {
@@ -31,7 +31,7 @@ GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& m,
- const GrTextureParams& params)
+ const GrSamplerParams& params)
: fCoordTransform(m, texture, params.filterMode())
, fTextureSampler(texture, params)
, fColorSpaceXform(std::move(colorSpaceXform)) {
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index fd1ba9803a..716ad2f294 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -37,11 +37,11 @@ protected:
GrSingleTextureEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkMatrix&);
/** clamp mode */
GrSingleTextureEffect(GrTexture*, sk_sp<GrColorSpaceXform>, const SkMatrix&,
- GrTextureParams::FilterMode filterMode);
+ GrSamplerParams::FilterMode filterMode);
GrSingleTextureEffect(GrTexture*,
sk_sp<GrColorSpaceXform>,
const SkMatrix&,
- const GrTextureParams&);
+ const GrSamplerParams&);
/**
* Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index a05a793026..51f305115a 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -176,7 +176,7 @@ sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(GrTexture* texture,
const SkMatrix& matrix,
const SkRect& domain,
GrTextureDomain::Mode mode,
- GrTextureParams::FilterMode filterMode) {
+ GrSamplerParams::FilterMode filterMode) {
static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1};
if (GrTextureDomain::kIgnore_Mode == mode ||
(GrTextureDomain::kClamp_Mode == mode && domain.contains(kFullRect))) {
@@ -193,11 +193,11 @@ GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
const SkMatrix& matrix,
const SkRect& domain,
GrTextureDomain::Mode mode,
- GrTextureParams::FilterMode filterMode)
+ GrSamplerParams::FilterMode filterMode)
: GrSingleTextureEffect(texture, std::move(colorSpaceXform), matrix, filterMode)
, fTextureDomain(domain, mode) {
SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
- filterMode == GrTextureParams::kNone_FilterMode);
+ filterMode == GrSamplerParams::kNone_FilterMode);
this->initClassID<GrTextureDomainEffect>();
}
@@ -280,7 +280,7 @@ sk_sp<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData
matrix,
domain,
mode,
- bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_FilterMode);
+ bilerp ? GrSamplerParams::kBilerp_FilterMode : GrSamplerParams::kNone_FilterMode);
}
///////////////////////////////////////////////////////////////////////////////
@@ -293,7 +293,7 @@ sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(GrTe
GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentProcessor(
GrTexture* texture, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
- : fTextureSampler(texture, GrTextureParams::ClampNoFilter())
+ : fTextureSampler(texture, GrSamplerParams::ClampNoFilter())
, fTextureDomain(GrTextureDomain::MakeTexelDomain(texture, subset),
GrTextureDomain::kDecal_Mode) {
this->addTextureSampler(&fTextureSampler);
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index d557d178f9..4c3cf22dee 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -171,7 +171,7 @@ public:
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode,
- GrTextureParams::FilterMode filterMode);
+ GrSamplerParams::FilterMode filterMode);
const char* name() const override { return "TextureDomain"; }
@@ -192,7 +192,7 @@ private:
const SkMatrix&,
const SkRect& domain,
GrTextureDomain::Mode,
- GrTextureParams::FilterMode);
+ GrSamplerParams::FilterMode);
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
diff --git a/src/gpu/effects/GrYUVEffect.cpp b/src/gpu/effects/GrYUVEffect.cpp
index 2fd35138fe..297835773a 100644
--- a/src/gpu/effects/GrYUVEffect.cpp
+++ b/src/gpu/effects/GrYUVEffect.cpp
@@ -78,13 +78,13 @@ public:
yuvMatrix[1].preScale(w[1] / w[0], h[1] / h[0]);
yuvMatrix[2] = yuvMatrix[0];
yuvMatrix[2].preScale(w[2] / w[0], h[2] / h[0]);
- GrTextureParams::FilterMode uvFilterMode =
+ GrSamplerParams::FilterMode uvFilterMode =
((sizes[1].fWidth != sizes[0].fWidth) ||
(sizes[1].fHeight != sizes[0].fHeight) ||
(sizes[2].fWidth != sizes[0].fWidth) ||
(sizes[2].fHeight != sizes[0].fHeight)) ?
- GrTextureParams::kBilerp_FilterMode :
- GrTextureParams::kNone_FilterMode;
+ GrSamplerParams::kBilerp_FilterMode :
+ GrSamplerParams::kNone_FilterMode;
return sk_sp<GrFragmentProcessor>(new YUVtoRGBEffect(
yTexture, uTexture, vTexture, yuvMatrix, uvFilterMode, colorSpace, nv12));
}
@@ -152,9 +152,9 @@ public:
private:
YUVtoRGBEffect(GrTexture* yTexture, GrTexture* uTexture, GrTexture* vTexture,
- const SkMatrix yuvMatrix[3], GrTextureParams::FilterMode uvFilterMode,
+ const SkMatrix yuvMatrix[3], GrSamplerParams::FilterMode uvFilterMode,
SkYUVColorSpace colorSpace, bool nv12)
- : fYTransform(yuvMatrix[0], yTexture, GrTextureParams::kNone_FilterMode)
+ : fYTransform(yuvMatrix[0], yTexture, GrSamplerParams::kNone_FilterMode)
, fYSampler(yTexture)
, fUTransform(yuvMatrix[1], uTexture, uvFilterMode)
, fUSampler(uTexture, uvFilterMode)