| Index: src/core/SkPaint.cpp
|
| diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
|
| index 86b54f22c86531917a616b55e4379eaa7af77f4e..16d8bb2e4ed79e628752e5937d804dd4c20b3d55 100644
|
| --- a/src/core/SkPaint.cpp
|
| +++ b/src/core/SkPaint.cpp
|
| @@ -11,7 +11,6 @@
|
| #include "SkColorFilter.h"
|
| #include "SkData.h"
|
| #include "SkDeviceProperties.h"
|
| -#include "SkDraw.h"
|
| #include "SkFontDescriptor.h"
|
| #include "SkFontHost.h"
|
| #include "SkGlyphCache.h"
|
| @@ -507,6 +506,15 @@
|
| return tooBig(matrix, MaxCacheSize2());
|
| }
|
|
|
| +bool SkPaint::tooBigToUseCache(const SkMatrix& ctm) const {
|
| + SkMatrix textM;
|
| + return TooBigToUseCache(ctm, *this->setTextMatrix(&textM));
|
| +}
|
| +
|
| +bool SkPaint::tooBigToUseCache() const {
|
| + SkMatrix textM;
|
| + return tooBig(*this->setTextMatrix(&textM), MaxCacheSize2());
|
| +}
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| @@ -989,7 +997,7 @@
|
| class SkCanonicalizePaint {
|
| public:
|
| SkCanonicalizePaint(const SkPaint& paint) : fPaint(&paint), fScale(0) {
|
| - if (paint.isLinearText() || SkDraw::ShouldDrawTextAsPaths(paint, SkMatrix::I())) {
|
| + if (paint.isLinearText() || paint.tooBigToUseCache()) {
|
| SkPaint* p = fLazy.set(paint);
|
| fScale = p->setupForAsPaths();
|
| fPaint = p;
|
|
|