aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/GrAlphaThresholdFragmentProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/GrAlphaThresholdFragmentProcessor.cpp')
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
index afafe08279..a259607444 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
@@ -32,12 +32,6 @@ sk_sp<GrFragmentProcessor> GrAlphaThresholdFragmentProcessor::Make(
bounds));
}
-static SkMatrix make_div_and_translate_matrix(GrTexture* texture, int x, int y) {
- SkMatrix matrix = GrCoordTransform::MakeDivByTextureWHMatrix(texture);
- matrix.preTranslate(SkIntToScalar(x), SkIntToScalar(y));
- return matrix;
-}
-
GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor(
GrTexture* texture,
sk_sp<GrColorSpaceXform> colorSpaceXform,
@@ -47,11 +41,11 @@ GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor(
const SkIRect& bounds)
: fInnerThreshold(innerThreshold)
, fOuterThreshold(outerThreshold)
- , fImageCoordTransform(GrCoordTransform::MakeDivByTextureWHMatrix(texture), texture,
- GrSamplerParams::kNone_FilterMode)
+ , fImageCoordTransform(SkMatrix::I(), texture, GrSamplerParams::kNone_FilterMode)
, fImageTextureSampler(texture)
, fColorSpaceXform(std::move(colorSpaceXform))
- , fMaskCoordTransform(make_div_and_translate_matrix(maskTexture, -bounds.x(), -bounds.y()),
+ , fMaskCoordTransform(SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()),
+ SkIntToScalar(-bounds.y())),
maskTexture,
GrSamplerParams::kNone_FilterMode)
, fMaskTextureSampler(maskTexture) {