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

Unified Diff: content/public/common/dwrite_font_platform_win.h

Issue 724633002: DirectWrite Font Cache browser side hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enforcing cache file size limit 20MB and reducing cached percentile. Created 6 years, 1 month 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 | « content/public/common/dwrite_font_cache_win.h ('k') | content/renderer/render_font_warmup_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/dwrite_font_platform_win.h
diff --git a/content/common/dwrite_font_platform_win.h b/content/public/common/dwrite_font_platform_win.h
similarity index 74%
rename from content/common/dwrite_font_platform_win.h
rename to content/public/common/dwrite_font_platform_win.h
index ea5a52fd90d5c4a172237d7250c04788b18d8efe..efff2861e9a18a20d9cd8a7168709a0f4a72fb3e 100644
--- a/content/common/dwrite_font_platform_win.h
+++ b/content/public/common/dwrite_font_platform_win.h
@@ -13,17 +13,20 @@ struct IDWriteFontCollection;
namespace content {
+// This is the shared section that is used between browser and renderer for
+// loading font cache. Section name is suffixed with browser process id so that
+// multiple instance chrome scenario works fine.
+CONTENT_EXPORT extern const char kFontCacheSharedSectionName[];
+
// Function returns custom font collection in terms of IDWriteFontCollection.
// This function maintains singleton instance of font collection and returns
// it on repeated calls.
CONTENT_EXPORT IDWriteFontCollection* GetCustomFontCollection(
IDWriteFactory* factory);
-// Build and load is to accomplish both tasks of creating a font cache within
-// specified file and then loading it, where loading means creating
-// readonly shared memory mapping. As this function need to iterate through all
+// Builds static font cache. As this function need to iterate through all
// available fonts in the system, it may take a while.
-CONTENT_EXPORT bool BuildAndLoadFontCache(const base::FilePath& file);
+CONTENT_EXPORT bool BuildFontCache(const base::FilePath& file);
// Loads font cache from file. This is supposed to be used from browser
// side where loading means creating readonly shared memory file mapping so that
« no previous file with comments | « content/public/common/dwrite_font_cache_win.h ('k') | content/renderer/render_font_warmup_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698