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

Side by Side Diff: content/browser/browser_main_runner.cc

Issue 726893005: Enable DirectWrite for font metrics and font rendering in Chrome UI on Windows by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | ui/gfx/switches.h » ('j') | ui/gfx/switches.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/public/browser/browser_main_runner.h" 5 #include "content/public/browser/browser_main_runner.h"
6 6
7 #include "base/allocator/allocator_shim.h" 7 #include "base/allocator/allocator_shim.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 DWORD dummy = 0; 112 DWORD dummy = 0;
113 CHECK(::VirtualProtect(cert_verify_signature_ptr, 5, old_protect, &dummy)); 113 CHECK(::VirtualProtect(cert_verify_signature_ptr, 5, old_protect, &dummy));
114 CHECK(::VirtualProtect(g_real_crypt_verify_signature_stub, 114 CHECK(::VirtualProtect(g_real_crypt_verify_signature_stub,
115 sidestep::kMaxPreambleStubSize, old_protect, 115 sidestep::kMaxPreambleStubSize, old_protect,
116 &old_protect)); 116 &old_protect));
117 #endif // _WIN64 117 #endif // _WIN64
118 } 118 }
119 119
120 void MaybeEnableDirectWriteFontRendering() { 120 void MaybeEnableDirectWriteFontRendering() {
121 if (gfx::win::ShouldUseDirectWrite() && 121 if (gfx::win::ShouldUseDirectWrite() &&
122 CommandLine::ForCurrentProcess()->HasSwitch( 122 !CommandLine::ForCurrentProcess()->HasSwitch(
123 switches::kEnableDirectWriteForUI) && 123 switches::kDisableDirectWriteForUI) &&
124 !CommandLine::ForCurrentProcess()->HasSwitch( 124 !CommandLine::ForCurrentProcess()->HasSwitch(
125 switches::kDisableHarfBuzzRenderText)) { 125 switches::kDisableHarfBuzzRenderText)) {
126 typedef decltype(DWriteCreateFactory)* DWriteCreateFactoryProc; 126 typedef decltype(DWriteCreateFactory)* DWriteCreateFactoryProc;
127 HMODULE dwrite_dll = LoadLibraryW(L"dwrite.dll"); 127 HMODULE dwrite_dll = LoadLibraryW(L"dwrite.dll");
128 if (!dwrite_dll) 128 if (!dwrite_dll)
129 return; 129 return;
130 130
131 DWriteCreateFactoryProc dwrite_create_factory_proc = 131 DWriteCreateFactoryProc dwrite_create_factory_proc =
132 reinterpret_cast<DWriteCreateFactoryProc>( 132 reinterpret_cast<DWriteCreateFactoryProc>(
133 GetProcAddress(dwrite_dll, "DWriteCreateFactory")); 133 GetProcAddress(dwrite_dll, "DWriteCreateFactory"));
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); 319 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl);
320 }; 320 };
321 321
322 // static 322 // static
323 BrowserMainRunner* BrowserMainRunner::Create() { 323 BrowserMainRunner* BrowserMainRunner::Create() {
324 return new BrowserMainRunnerImpl(); 324 return new BrowserMainRunnerImpl();
325 } 325 }
326 326
327 } // namespace content 327 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/switches.h » ('j') | ui/gfx/switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698