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

Unified Diff: core/fxge/skia/fx_skia_device.cpp

Issue 1837113004: Support the device font cache (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: address comments Created 4 years, 8 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 | « core/fxge/ge/fx_ge_text.cpp ('k') | core/include/fxge/fx_font.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/skia/fx_skia_device.cpp
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 745c9b50fd7f05a292800e9038ad2ca12f96fb6c..e61dda68d4ee1a8ea06e0743e50da0e73d60adb4 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -320,8 +320,7 @@ FX_BOOL CFX_SkiaDeviceDriver::DrawDeviceText(int nChars,
uint32_t color,
int alpha_flag,
void* pIccTransform) {
- SkAutoTUnref<SkTypeface> typeface(SkTypeface::CreateFromStream(
- new SkMemoryStream(pFont->GetFontData(), pFont->GetSize())));
+ CFX_TypeFace* typeface = pCache->GetDeviceCache(pFont);
SkPaint paint;
paint.setAntiAlias(true);
paint.setColor(color);
« no previous file with comments | « core/fxge/ge/fx_ge_text.cpp ('k') | core/include/fxge/fx_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698