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

Unified Diff: core/include/fxge/fx_font.h

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/skia/fx_skia_device.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxge/fx_font.h
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index c52e614e9722ab490c49e9e656af667a3d8c2586..4e2b97e6774c7ad0cf855ed519e08b17f09e60fc 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -27,6 +27,12 @@ class CFX_SubstFont;
class CTTFontDesc;
class IFX_SystemFontInfo;
+#ifdef _SKIA_SUPPORT_
+class SkTypeface;
+
+using CFX_TypeFace = SkTypeface;
+#endif
+
#define FXFONT_FIXED_PITCH 0x01
#define FXFONT_SERIF 0x02
#define FXFONT_SYMBOLIC 0x04
@@ -452,6 +458,9 @@ class CFX_FontCache {
CFX_FaceCache* GetCachedFace(CFX_Font* pFont);
void ReleaseCachedFace(CFX_Font* pFont);
void FreeCache(FX_BOOL bRelease = FALSE);
+#ifdef _SKIA_SUPPORT_
+ CFX_TypeFace* GetDeviceCache(CFX_Font* pFont);
+#endif
private:
using CFX_FTCacheMap = std::map<FXFT_Face, CFX_CountedFaceCache*>;
@@ -490,6 +499,10 @@ class CFX_FaceCache {
uint32_t glyph_index,
int dest_width);
+#ifdef _SKIA_SUPPORT_
+ CFX_TypeFace* GetDeviceCache(CFX_Font* pFont);
+#endif
+
private:
CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont,
uint32_t glyph_index,
@@ -516,6 +529,9 @@ class CFX_FaceCache {
std::map<CFX_ByteString, CFX_SizeGlyphCache*> m_SizeMap;
std::map<uint32_t, CFX_PathData*> m_PathMap;
CFX_DIBitmap* m_pBitmap;
+#ifdef _SKIA_SUPPORT_
+ CFX_TypeFace* m_pTypeface;
+#endif
};
struct FXTEXT_GLYPHPOS {
« no previous file with comments | « core/fxge/skia/fx_skia_device.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698