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

Side by Side Diff: ui/gfx/win/direct_write.cc

Issue 891013003: Delete RenderTextWin and RenderTextPango. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update switch comment Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/gfx/win/direct_write.h" 5 #include "ui/gfx/win/direct_write.h"
6 6
7 #include <dwrite.h> 7 #include <dwrite.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 void MaybeInitializeDirectWrite() { 60 void MaybeInitializeDirectWrite() {
61 static bool tried_dwrite_initialize = false; 61 static bool tried_dwrite_initialize = false;
62 if (tried_dwrite_initialize) 62 if (tried_dwrite_initialize)
63 return; 63 return;
64 tried_dwrite_initialize = true; 64 tried_dwrite_initialize = true;
65 65
66 if (!ShouldUseDirectWrite() || 66 if (!ShouldUseDirectWrite() ||
67 base::CommandLine::ForCurrentProcess()->HasSwitch( 67 base::CommandLine::ForCurrentProcess()->HasSwitch(
68 switches::kDisableDirectWriteForUI) || 68 switches::kDisableDirectWriteForUI)) {
69 base::CommandLine::ForCurrentProcess()->HasSwitch(
70 switches::kDisableHarfBuzzRenderText)) {
71 return; 69 return;
72 } 70 }
73 71
74 using DWriteCreateFactoryProc = decltype(DWriteCreateFactory)*; 72 using DWriteCreateFactoryProc = decltype(DWriteCreateFactory)*;
75 HMODULE dwrite_dll = LoadLibraryW(L"dwrite.dll"); 73 HMODULE dwrite_dll = LoadLibraryW(L"dwrite.dll");
76 if (!dwrite_dll) 74 if (!dwrite_dll)
77 return; 75 return;
78 76
79 DWriteCreateFactoryProc dwrite_create_factory_proc = 77 DWriteCreateFactoryProc dwrite_create_factory_proc =
80 reinterpret_cast<DWriteCreateFactoryProc>( 78 reinterpret_cast<DWriteCreateFactoryProc>(
(...skipping 23 matching lines...) Expand all
104 SetDefaultSkiaFactory(direct_write_font_mgr); 102 SetDefaultSkiaFactory(direct_write_font_mgr);
105 gfx::PlatformFontWin::SetDirectWriteFactory(factory.get()); 103 gfx::PlatformFontWin::SetDirectWriteFactory(factory.get());
106 } 104 }
107 105
108 bool IsDirectWriteEnabled() { 106 bool IsDirectWriteEnabled() {
109 return dwrite_enabled; 107 return dwrite_enabled;
110 } 108 }
111 109
112 } // namespace win 110 } // namespace win
113 } // namespace gfx 111 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698