Fix refcounting bug for Type1 font usage with more than 255 characters.

R=bungeman@google.com

Author: vandebo@chromium.org

Review URL: https://codereview.chromium.org/103423003

git-svn-id: http://skia.googlecode.com/svn/trunk@12520 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-12-05 21:14:02 +00:00
parent dbba5a4e97
commit 456610717b

View File

@ -875,9 +875,8 @@ SkPDFFont::SkPDFFont(SkAdvancedTypefaceMetrics* info, SkTypeface* typeface,
fTypeface(ref_or_default(typeface)), fTypeface(ref_or_default(typeface)),
fFirstGlyphID(1), fFirstGlyphID(1),
fLastGlyphID(info ? info->fLastGlyphID : 0), fLastGlyphID(info ? info->fLastGlyphID : 0),
fFontInfo(info), fFontInfo(SkSafeRef(info)),
fDescriptor(relatedFontDescriptor) { fDescriptor(SkSafeRef(relatedFontDescriptor)) {
SkSafeRef(info);
if (info == NULL) { if (info == NULL) {
fFontType = SkAdvancedTypefaceMetrics::kNotEmbeddable_Font; fFontType = SkAdvancedTypefaceMetrics::kNotEmbeddable_Font;
} else if (info->fMultiMaster) { } else if (info->fMultiMaster) {