[PDF] Add debug assert to detect failure of GDI cache hack.

If we start hitting this check, then it's likely that something has regressed in WebKit.

Original CL from arthurhsu@chromium.org: http://codereview.appspot.com/5322063/

Review URL: http://codereview.appspot.com/5320062

git-svn-id: http://skia.googlecode.com/svn/trunk@2581 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
vandebo@chromium.org 2011-11-01 23:03:20 +00:00
parent ab77aafa8c
commit 083be07f8f

View File

@ -774,6 +774,7 @@ SkPDFFont* SkPDFFont::GetFontResource(SkTypeface* typeface, uint16_t glyphID) {
fontMetrics =
SkFontHost::GetAdvancedTypefaceMetrics(fontID, info, NULL, 0);
#if defined (SK_SFNTLY_SUBSETTER)
SkASSERT(fontMetrics);
SkSafeUnref(fontMetrics.get()); // SkRefPtr and Get both took a ref.
if (fontMetrics &&
fontMetrics->fType != SkAdvancedTypefaceMetrics::kTrueType_Font) {