Chromium Code Reviews| Index: src/core/SkMatrix.cpp |
| diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp |
| index dfeb721d45e68394f4bf2db1906c11d708f044e3..7478114320b7ae05e4ab9b477ff17cc10660e208 100644 |
| --- a/src/core/SkMatrix.cpp |
| +++ b/src/core/SkMatrix.cpp |
| @@ -1623,8 +1623,11 @@ void SkMatrix::toString(SkString* str) const { |
| #include "SkMatrixUtils.h" |
| -bool SkTreatAsSprite(const SkMatrix& mat, int width, int height, |
| - unsigned subpixelBits) { |
| +bool SkTreatAsSprite(const SkMatrix& mat, const SkISize& size, const SkPaint& paint) { |
| + static const unsigned kAntiAliasSubpixelBits = 4; |
|
reed1
2016/01/07 15:29:59
maybe a comment, like "our path aa is 2-bits, and
f(malita)
2016/01/07 15:39:35
Done.
|
| + |
| + const unsigned subpixelBits = paint.isAntiAlias() ? kAntiAliasSubpixelBits : 0; |
| + |
| // quick reject on affine or perspective |
| if (mat.getType() & ~(SkMatrix::kScale_Mask | SkMatrix::kTranslate_Mask)) { |
| return false; |
| @@ -1641,7 +1644,7 @@ bool SkTreatAsSprite(const SkMatrix& mat, int width, int height, |
| } |
| SkRect dst; |
| - SkIRect isrc = { 0, 0, width, height }; |
| + SkIRect isrc = SkIRect::MakeSize(size); |
| { |
| SkRect src; |