Use kLow_SkFilterQuality when generating shader masks

This prevents edge aliasing for kDecal tiling.

Change-Id: I3a66e49ec1900bbe19c6700ec2f766122af4a3ce
Reviewed-on: https://skia-review.googlesource.com/113124
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2018-03-08 09:57:54 -05:00 committed by Skia Commit-Bot
parent 26b50a4cda
commit 4997e14c80

View File

@ -103,6 +103,7 @@ bool SkShaderMF::filterMask(SkMask* dst, const SkMask& src, const SkMatrix& ctm,
SkPaint paint; SkPaint paint;
paint.setShader(fShader); paint.setShader(fShader);
paint.setFilterQuality(SkFilterQuality::kLow_SkFilterQuality);
// this blendmode is the trick: we only draw the shader where the mask is // this blendmode is the trick: we only draw the shader where the mask is
paint.setBlendMode(SkBlendMode::kSrcIn); paint.setBlendMode(SkBlendMode::kSrcIn);