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

Unified Diff: src/fonts/SkTestScalerContext.cpp

Issue 1175253004: initialize font metrics for pdf (found by valgrind) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix cast Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkTestScalerContext.cpp
diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp
index ed98dba19e757b626d9f25c0c989128c0d0ef716..194cd0907c21aeb48b157bd00e5bc7a665bad66b 100644
--- a/src/fonts/SkTestScalerContext.cpp
+++ b/src/fonts/SkTestScalerContext.cpp
@@ -145,11 +145,13 @@ SkAdvancedTypefaceMetrics* SkTestTypeface::onGetAdvancedTypefaceMetrics(
uint32_t glyphIDsCount) const {
// pdf only
SkAdvancedTypefaceMetrics* info = new SkAdvancedTypefaceMetrics;
+ info->fFontName.set(fTestFont->fName);
+ info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
+ info->fFlags = SkAdvancedTypefaceMetrics::kEmpty_FontFlag;
+ info->fLastGlyphID = static_cast<uint16_t>(fTestFont->fCharCodesCount - 1);
info->fEmSize = 0;
info->fLastGlyphID = SkToU16(onCountGlyphs() - 1);
hal.canary 2015/06/11 15:55:44 info->fLastGlyphID gets set twice.
info->fStyle = 0;
- info->fFontName.set(fTestFont->fName);
- info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
info->fItalicAngle = 0;
info->fAscent = 0;
info->fDescent = 0;
« 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