diff options
author | Mike Reed <reed@google.com> | 2018-01-17 23:04:04 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-19 18:38:33 +0000 |
commit | 282662718751155cdf985a5702ccd284e3f7e4f8 (patch) | |
tree | 07de695d0eaed89d63fc5519cd8bf6203c241f3d /gm | |
parent | 88260b549fcff1715ab9bb9b1a442e0abacce2e5 (diff) |
drawimage + maskfilter bug fix
bug: we ignored maskfilter in spriteblitter case
Bug: skia:
Change-Id: I2c9423396a7a9ed3b81cd86e3a5edebbf34538db
Reviewed-on: https://skia-review.googlesource.com/96120
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'gm')
-rw-r--r-- | gm/blurimagevmask.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gm/blurimagevmask.cpp b/gm/blurimagevmask.cpp index 15f8d1e1ca..c1f9b3e1ec 100644 --- a/gm/blurimagevmask.cpp +++ b/gm/blurimagevmask.cpp @@ -55,3 +55,18 @@ DEF_SIMPLE_GM(blurimagevmask, canvas, 700, 1200) { } } + +#include "Resources.h" +DEF_SIMPLE_GM(blur_image, canvas, 500, 500) { + auto image = GetResourceAsImage("images/mandrill_128.png"); + + SkPaint paint; + paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, 4)); + + // both of these should draw with the blur, but (formerally) we had a bug where the unscaled + // version (taking the spriteblitter code path) ignore the maskfilter. + + canvas->drawImage(image, 10, 10, &paint); + canvas->scale(1.01f, 1.01f); + canvas->drawImage(image, 10 + image->width() + 10.f, 10, &paint); +} |