Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/core/SkPaint.cpp

Issue 349153005: Revert of Revert of Fix SkPaint::measureText for stroked hairline text (Closed) Base URL: https://skia.googlesource.com/skia.git@01-draw-fonts-nvpr-extract-state-procs
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPaint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 16d8bb2e4ed79e628752e5937d804dd4c20b3d55..86b54f22c86531917a616b55e4379eaa7af77f4e 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 @@
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 @@
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;
« no previous file with comments | « include/core/SkPaint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698