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

Side by Side Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 248593002: [DirectWrite] Force subpixel font sizing to on when DW is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (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/renderer/renderer_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/win/scoped_comptr.h" 11 #include "base/win/scoped_comptr.h"
12 #include "base/win/win_util.h" 12 #include "base/win/win_util.h"
13 #include "base/win/windows_version.h" 13 #include "base/win/windows_version.h"
14 #include "content/common/sandbox_win.h" 14 #include "content/common/sandbox_win.h"
15 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
16 #include "content/public/common/injection_test_win.h" 16 #include "content/public/common/injection_test_win.h"
17 #include "content/public/renderer/render_font_warmup_win.h" 17 #include "content/public/renderer/render_font_warmup_win.h"
18 #include "content/public/renderer/render_thread.h" 18 #include "content/public/renderer/render_thread.h"
19 #include "content/renderer/render_thread_impl.h" 19 #include "content/renderer/render_thread_impl.h"
20 #include "sandbox/win/src/sandbox.h" 20 #include "sandbox/win/src/sandbox.h"
21 #include "skia/ext/vector_platform_device_emf_win.h" 21 #include "skia/ext/vector_platform_device_emf_win.h"
22 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
22 #include "third_party/WebKit/public/web/win/WebFontRendering.h" 23 #include "third_party/WebKit/public/web/win/WebFontRendering.h"
23 #include "third_party/icu/source/i18n/unicode/timezone.h" 24 #include "third_party/icu/source/i18n/unicode/timezone.h"
24 #include "third_party/skia/include/ports/SkFontMgr.h" 25 #include "third_party/skia/include/ports/SkFontMgr.h"
25 #include "third_party/skia/include/ports/SkTypeface_win.h" 26 #include "third_party/skia/include/ports/SkTypeface_win.h"
26 27
27 #ifdef ENABLE_VTUNE_JIT_INTERFACE 28 #ifdef ENABLE_VTUNE_JIT_INTERFACE
28 #include "v8/src/third_party/vtune/v8-vtune.h" 29 #include "v8/src/third_party/vtune/v8-vtune.h"
29 #endif 30 #endif
30 31
31 #include <dwrite.h> 32 #include <dwrite.h>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 97
97 if (use_direct_write) { 98 if (use_direct_write) {
98 WarmupDirectWrite(); 99 WarmupDirectWrite();
99 } else { 100 } else {
100 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); 101 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
101 skia::SetSkiaEnsureTypefaceCharactersAccessible( 102 skia::SetSkiaEnsureTypefaceCharactersAccessible(
102 SkiaPreCacheFontCharacters); 103 SkiaPreCacheFontCharacters);
103 } 104 }
104 } 105 }
105 blink::WebFontRendering::setUseDirectWrite(use_direct_write); 106 blink::WebFontRendering::setUseDirectWrite(use_direct_write);
106 blink::WebFontRendering::setUseSubpixelPositioning(use_direct_write); 107 if (use_direct_write) {
108 blink::WebRuntimeFeatures::enableSubpixelFontScaling(true);
109 }
107 } 110 }
108 111
109 void RendererMainPlatformDelegate::PlatformUninitialize() { 112 void RendererMainPlatformDelegate::PlatformUninitialize() {
110 } 113 }
111 114
112 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { 115 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
113 const CommandLine& command_line = parameters_.command_line; 116 const CommandLine& command_line = parameters_.command_line;
114 117
115 DVLOG(1) << "Started renderer with " << command_line.GetCommandLineString(); 118 DVLOG(1) << "Started renderer with " << command_line.GetCommandLineString();
116 119
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (run_security_tests) { 161 if (run_security_tests) {
159 int test_count = 0; 162 int test_count = 0;
160 DVLOG(1) << "Running renderer security tests"; 163 DVLOG(1) << "Running renderer security tests";
161 BOOL result = run_security_tests(&test_count); 164 BOOL result = run_security_tests(&test_count);
162 CHECK(result) << "Test number " << test_count << " has failed."; 165 CHECK(result) << "Test number " << test_count << " has failed.";
163 } 166 }
164 } 167 }
165 } 168 }
166 169
167 } // namespace content 170 } // namespace content
OLDNEW
« 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