aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrBicubicEffect.cpp
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/GrBicubicEffect.cpp
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/GrBicubicEffect.cpp')
-rw-r--r--src/gpu/effects/GrBicubicEffect.cpp16
1 files changed, 8 insertions, 8 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;
}