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

Unified Diff: ui/gfx/win/direct_write.cc

Issue 1839213002: Move check for --disable-directwrite-for-ui switch (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/direct_write.cc
diff --git a/ui/gfx/win/direct_write.cc b/ui/gfx/win/direct_write.cc
index 71a023f316b6d35652b34f0774a3333e333774cb..bf8c881d946c73d2a4308420391b2b6f4a04f3c6 100644
--- a/ui/gfx/win/direct_write.cc
+++ b/ui/gfx/win/direct_write.cc
@@ -44,11 +44,8 @@ bool ShouldUseDirectWrite() {
}
void CreateDWriteFactory(IDWriteFactory** factory) {
- if (!ShouldUseDirectWrite() ||
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableDirectWriteForUI)) {
+ if (!ShouldUseDirectWrite())
return;
- }
using DWriteCreateFactoryProc = decltype(DWriteCreateFactory)*;
HMODULE dwrite_dll = LoadLibraryW(L"dwrite.dll");
@@ -78,6 +75,11 @@ void MaybeInitializeDirectWrite() {
return;
tried_dwrite_initialize = true;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableDirectWriteForUI)) {
+ return;
+ }
+
base::win::ScopedComPtr<IDWriteFactory> factory;
CreateDWriteFactory(factory.Receive());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698