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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 1523053004: Remove unneeded code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dwfontrevert2
Patch Set: Created 5 years 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/test/render_view_test.cc ('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 675961da16ca60e94ab6d7135f398a0053e78303..a27b24d6dc42c1c8fd96b49ee374aa0d09d7337f 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -4,6 +4,8 @@
#include "content/renderer/renderer_main_platform_delegate.h"
+#include <dwrite.h>
+
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -11,7 +13,7 @@
#include "base/win/scoped_comptr.h"
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
-#include "content/common/font_warmup_win.h"
+#include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/injection_test_win.h"
#include "content/public/renderer/render_thread.h"
@@ -24,8 +26,6 @@
#include "ui/gfx/win/direct_write.h"
#include "ui/gfx/win/dpi.h"
-#include <dwrite.h>
-
namespace content {
namespace {
@@ -38,6 +38,11 @@ void SkiaPreCacheFont(const LOGFONT& logfont) {
}
}
+// Helper function to cast RenderThred to IPC::Sender so we can Bind() it.
+IPC::Sender* GetRenderThreadSender() {
+ return RenderThread::Get();
+}
+
} // namespace
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
@@ -67,7 +72,7 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
if (use_direct_write) {
- WarmupDirectWrite();
+ InitializeDWriteFontProxy(base::Bind(&GetRenderThreadSender));
} else {
SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
}
@@ -77,6 +82,7 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
}
void RendererMainPlatformDelegate::PlatformUninitialize() {
+ UninitializeDWriteFontProxy();
}
bool RendererMainPlatformDelegate::EnableSandbox() {
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698