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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 1845063002: Revert of Remove font cache code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « content/public/common/dwrite_font_platform_win.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main_platform_delegate_win.cc
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index a557eabdac708d9adb6e93a50907d31ea468df3f..e1dd2e3ccb0a7a8650749c8f6adf58f9fba28457 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -16,6 +16,7 @@
#include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h"
#include "content/child/font_warmup_win.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/dwrite_font_platform_win.h"
#include "content/public/common/injection_test_win.h"
#include "content/public/renderer/render_thread.h"
#include "content/renderer/render_thread_impl.h"
@@ -74,7 +75,10 @@
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
if (use_direct_write) {
- InitializeDWriteFontProxy(base::Bind(&GetRenderThreadSender));
+ if (ShouldUseDirectWriteFontProxyFieldTrial())
+ InitializeDWriteFontProxy(base::Bind(&GetRenderThreadSender));
+ else
+ WarmupDirectWrite();
} else {
SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
}
@@ -84,7 +88,8 @@
}
void RendererMainPlatformDelegate::PlatformUninitialize() {
- UninitializeDWriteFontProxy();
+ if (ShouldUseDirectWriteFontProxyFieldTrial())
+ UninitializeDWriteFontProxy();
}
bool RendererMainPlatformDelegate::EnableSandbox() {
« no previous file with comments | « content/public/common/dwrite_font_platform_win.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698