aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapDevice.cpp
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-04-10 16:47:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-11 11:25:06 +0000
commit2097fd03ffea48bd904c48c93348b2350600870e (patch)
tree11fac8634429396ed18c59d1e73a8e5dde379de8 /src/core/SkBitmapDevice.cpp
parenta479f96dafa94549ed3b5b72d1d25bacd9d18b16 (diff)
Fix handling of MaskFilter matrices
1) extend GrFPArgs to track pre/post local matrices, add helpers for creating pre/post wrapper args 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM sandwich logic. 3) update call sites to use the above 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to disambiguate vs. SkShader::makeWithLocalMatrix. BUG=skia:7744 Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 Reviewed-on: https://skia-review.googlesource.com/119330 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r--src/core/SkBitmapDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 5f84ba1aec..26cdc39313 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -487,7 +487,7 @@ void SkBitmapDevice::drawDevice(SkBaseDevice* device, int x, int y, const SkPain
// todo: can we unify with similar adjustment in SkGpuDevice?
SkTCopyOnFirstWrite<SkPaint> paint(origPaint);
if (paint->getMaskFilter()) {
- paint.writable()->setMaskFilter(paint->getMaskFilter()->makeWithLocalMatrix(this->ctm()));
+ paint.writable()->setMaskFilter(paint->getMaskFilter()->makeWithMatrix(this->ctm()));
}
this->drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, *paint);
}
@@ -546,7 +546,7 @@ void SkBitmapDevice::drawSpecial(SkSpecialImage* src, int x, int y, const SkPain
}
if (paint->getMaskFilter()) {
- paint.writable()->setMaskFilter(paint->getMaskFilter()->makeWithLocalMatrix(this->ctm()));
+ paint.writable()->setMaskFilter(paint->getMaskFilter()->makeWithMatrix(this->ctm()));
}
if (!clipImage) {