aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkPaint.cpp')
-rw-r--r--src/core/SkPaint.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 16d8bb2e4e..86b54f22c8 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -11,6 +11,7 @@
#include "SkColorFilter.h"
#include "SkData.h"
#include "SkDeviceProperties.h"
+#include "SkDraw.h"
#include "SkFontDescriptor.h"
#include "SkFontHost.h"
#include "SkGlyphCache.h"
@@ -506,15 +507,6 @@ bool SkPaint::TooBigToUseCache(const SkMatrix& ctm, const SkMatrix& textM) {
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());
-}
///////////////////////////////////////////////////////////////////////////////
@@ -997,7 +989,7 @@ SkScalar SkPaint::setupForAsPaths() {
class SkCanonicalizePaint {
public:
SkCanonicalizePaint(const SkPaint& paint) : fPaint(&paint), fScale(0) {
- if (paint.isLinearText() || paint.tooBigToUseCache()) {
+ if (paint.isLinearText() || SkDraw::ShouldDrawTextAsPaths(paint, SkMatrix::I())) {
SkPaint* p = fLazy.set(paint);
fScale = p->setupForAsPaths();
fPaint = p;