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

Side by Side Diff: content/public/common/dwrite_font_platform_win.h

Issue 1847173002: Revert "Revert of Remove font cache code (patchset #3 id:40001 of https://codereview.chromium.org/1… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test expectations to rebaseline tests on Win10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_COMMON_DWRITE_FONT_PLATFORM_WIN_H_
6 #define CONTENT_PUBLIC_COMMON_DWRITE_FONT_PLATFORM_WIN_H_
7
8 #include "base/files/file.h"
9 #include "content/common/content_export.h"
10
11 struct IDWriteFactory;
12 struct IDWriteFontCollection;
13
14 namespace content {
15
16 // This is the shared section that is used between browser and renderer for
17 // loading font cache. Section name is suffixed with browser process id so that
18 // multiple instance chrome scenario works fine.
19 CONTENT_EXPORT extern const char kFontCacheSharedSectionName[];
20
21 // Function returns custom font collection in terms of IDWriteFontCollection.
22 // This function maintains singleton instance of font collection and returns
23 // it on repeated calls.
24 CONTENT_EXPORT IDWriteFontCollection* GetCustomFontCollection(
25 IDWriteFactory* factory);
26
27 // Builds static font cache. As this function need to iterate through all
28 // available fonts in the system, it may take a while.
29 CONTENT_EXPORT bool BuildFontCache(const base::FilePath& file);
30
31 // Loads font cache from file. This is supposed to be used from browser
32 // side where loading means creating readonly shared memory file mapping so that
33 // renderers can read from it.
34 CONTENT_EXPORT bool LoadFontCache(const base::FilePath& path);
35
36 // Added in header mainly for unittest
37 CONTENT_EXPORT bool ValidateFontCacheFile(base::File* file);
38
39 // Determines whether code should use the DirectWrite font proxy codepath.
40 // Note that this function only checks whether the field trial is enabled.
41 // Callers are still expected to take appropriate action based on the return
42 // value.
43 CONTENT_EXPORT bool ShouldUseDirectWriteFontProxyFieldTrial();
44
45 } // namespace content
46
47 #endif // CONTENT_PUBLIC_COMMON_DWRITE_FONT_PLATFORM_WIN_H_
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_plugin_main.cc ('k') | content/renderer/renderer_main_platform_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698