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

Side by Side Diff: content/common/font_warmup_win.h

Issue 1327673002: Added GDI font emulation support for Flash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@warmup_direct_write
Patch Set: Implemented review changes. Created 5 years, 3 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
« no previous file with comments | « no previous file | content/common/font_warmup_win.cc » ('j') | content/common/font_warmup_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_FONT_WARMUP_WIN_H_ 5 #ifndef CONTENT_COMMON_FONT_WARMUP_WIN_H_
6 #define CONTENT_COMMON_FONT_WARMUP_WIN_H_ 6 #define CONTENT_COMMON_FONT_WARMUP_WIN_H_
7 7
8 #include "base/files/file_path.h"
8 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
9 10
10 class SkFontMgr; 11 class SkFontMgr;
11 class SkTypeface; 12 class SkTypeface;
12 13
13 namespace content { 14 namespace content {
14 15
15 // Make necessary calls to cache the data for a given font, used before 16 // Make necessary calls to cache the data for a given font, used before
16 // sandbox lockdown. 17 // sandbox lockdown.
17 CONTENT_EXPORT void DoPreSandboxWarmupForTypeface(SkTypeface* typeface); 18 CONTENT_EXPORT void DoPreSandboxWarmupForTypeface(SkTypeface* typeface);
18 19
19 // Get the shared font manager used during pre-sandbox warmup for DirectWrite 20 // Get the shared font manager used during pre-sandbox warmup for DirectWrite
20 // fonts. 21 // fonts.
21 CONTENT_EXPORT SkFontMgr* GetPreSandboxWarmupFontMgr(); 22 CONTENT_EXPORT SkFontMgr* GetPreSandboxWarmupFontMgr();
22 23
24 class GdiFontPatchData {
25 public:
26 virtual ~GdiFontPatchData() {}
27
28 protected:
29 GdiFontPatchData() {}
30
31 private:
32 DISALLOW_COPY_AND_ASSIGN(GdiFontPatchData);
33 };
34
35 // Hook a module's imported GDI font functions to reimplement font enumeration
36 // and font data retrieval for DLLs which can't be easily modified.
37 CONTENT_EXPORT GdiFontPatchData* PatchGdiFontEnumeration(
38 const base::FilePath& path);
39
40 // Testing method to get the number of in-flight emulated GDI handles.
41 CONTENT_EXPORT size_t GetEmulatedGdiHandleCount();
42
43 // Testing method to reset the table of emulated GDI handles.
44 CONTENT_EXPORT void ResetEmulatedGdiHandles();
45
46 // Sets the pre-sandbox warmup font manager directly. This should only be used
47 // for testing the implementation.
48 CONTENT_EXPORT void SetPreSandboxWarmupFontMgr(SkFontMgr* fontmgr);
nasko 2015/09/21 15:58:20 Testing only methods should indicate this somehow
forshaw 2015/09/21 22:06:20 Acknowledged.
49
23 // Warmup the direct write font manager for content processes. 50 // Warmup the direct write font manager for content processes.
24 CONTENT_EXPORT void WarmupDirectWrite(); 51 CONTENT_EXPORT void WarmupDirectWrite();
25 52
26 } // namespace content 53 } // namespace content
27 54
28 #endif // CONTENT_COMMON_FONT_WARMUP_WIN_H_ 55 #endif // CONTENT_COMMON_FONT_WARMUP_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/font_warmup_win.cc » ('j') | content/common/font_warmup_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698