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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 19668002: [PDF] Use SkTypeface::countGlyphs instead of getAdvancedTypefaceMetrics (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index db0825af3a9f39d19dcc2a009690484cd32e8137..a8fc3990d8694197039e239a4546f2dbee831540 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -105,18 +105,7 @@ static void align_text(SkDrawCacheProc glyphCacheProc, const SkPaint& paint,
static size_t max_glyphid_for_typeface(SkTypeface* typeface) {
SkAutoResolveDefaultTypeface autoResolve(typeface);
typeface = autoResolve.get();
-
- SkAdvancedTypefaceMetrics* metrics;
- metrics = typeface->getAdvancedTypefaceMetrics(
- SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo,
- NULL, 0);
-
- int lastGlyphID = 0;
- if (metrics) {
- lastGlyphID = metrics->fLastGlyphID;
- metrics->unref();
- }
- return lastGlyphID;
+ return typeface->countGlyphs() - 1;
}
typedef SkAutoSTMalloc<128, uint16_t> SkGlyphStorage;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698