Rename fillRectWithLocalMatrix -> fillPixelsWithLocalMatrix
Rounding out to pixel grid boundaries makes this method dmsaa-ready by
ensuring no pixels have partial msaa sample coverage.
Bug: skia:11396
Change-Id: I2543c8806f94692992a692bd5adedf41326c8910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383416
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 0ac719d..dcf14c2 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -42,7 +42,7 @@
static bool draw_mask(GrSurfaceDrawContext* surfaceDrawContext,
const GrClip* clip,
const SkMatrix& viewMatrix,
- const SkIRect& maskRect,
+ const SkIRect& maskBounds,
GrPaint&& paint,
GrSurfaceProxyView mask) {
SkMatrix inverse;
@@ -52,14 +52,13 @@
mask.concatSwizzle(GrSwizzle("aaaa"));
- SkMatrix matrix = SkMatrix::Translate(-SkIntToScalar(maskRect.fLeft),
- -SkIntToScalar(maskRect.fTop));
+ SkMatrix matrix = SkMatrix::Translate(-SkIntToScalar(maskBounds.fLeft),
+ -SkIntToScalar(maskBounds.fTop));
matrix.preConcat(viewMatrix);
paint.setCoverageFragmentProcessor(
GrTextureEffect::Make(std::move(mask), kUnknown_SkAlphaType, matrix));
- surfaceDrawContext->fillRectWithLocalMatrix(clip, std::move(paint), GrAA::kNo, SkMatrix::I(),
- SkRect::Make(maskRect), inverse);
+ surfaceDrawContext->fillPixelsWithLocalMatrix(clip, std::move(paint), maskBounds, inverse);
return true;
}