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

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: fix formatting 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
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 ed6ff82fd051df299a40fbf808c21045d7487835..fa10f249a6e44345ab73bd517034ec3d33f633f2 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,
FX_DWORD color,
int alpha_flag,
void* pIccTransform) {
- SkAutoTUnref<SkTypeface> typeface(SkTypeface::CreateFromStream(
- new SkMemoryStream(pFont->GetFontData(), pFont->GetSize())));
+ SkTypeface* typeface = pCache->GetDeviceCache(pFont);
SkPaint paint;
paint.setAntiAlias(true);
paint.setColor(color);

Powered by Google App Engine
This is Rietveld 408576698