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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 212953007: Control DirectWrite from browser side, no RuntimeEnabledFeature any more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix no-sandbox Created 6 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/common/sandbox_win.cc ('k') | no next file » | 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 2ed9599f3ca97437b37826f4ec6344e554852fee..f907a192e027f880fff3bb591d0256ce0ab10c57 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -18,6 +18,7 @@
#include "content/renderer/render_thread_impl.h"
#include "sandbox/win/src/sandbox.h"
#include "skia/ext/vector_platform_device_emf_win.h"
+#include "third_party/WebKit/public/web/win/WebFontRendering.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "third_party/skia/include/ports/SkTypeface_win.h"
@@ -118,6 +119,7 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
// malicious code if the renderer gets compromised.
bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox);
+ bool use_direct_write = ShouldUseDirectWrite();
if (!no_sandbox) {
// ICU DateFormat class (used in base/time_format.cc) needs to get the
// Olson timezone ID by accessing the registry keys under
@@ -127,7 +129,7 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
// is disabled, we don't have to make this dummy call.
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
- if (ShouldUseDirectWrite()) {
+ if (use_direct_write) {
WarmupDirectWrite();
} else {
SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
@@ -135,6 +137,8 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
SkiaPreCacheFontCharacters);
}
}
+ blink::WebFontRendering::setUseDirectWrite(use_direct_write);
+ blink::WebFontRendering::setUseSubpixelPositioning(use_direct_write);
}
void RendererMainPlatformDelegate::PlatformUninitialize() {
« no previous file with comments | « content/common/sandbox_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698