Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/fontmgr_default_win.h" | |
| 21 #include "skia/ext/vector_platform_device_emf_win.h" | 22 #include "skia/ext/vector_platform_device_emf_win.h" |
| 22 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 23 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 23 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 24 #include "third_party/WebKit/public/web/win/WebFontRendering.h" |
| 24 #include "third_party/icu/source/i18n/unicode/timezone.h" | 25 #include "third_party/icu/source/i18n/unicode/timezone.h" |
| 25 #include "third_party/skia/include/ports/SkFontMgr.h" | 26 #include "third_party/skia/include/ports/SkFontMgr.h" |
| 26 #include "third_party/skia/include/ports/SkTypeface_win.h" | 27 #include "third_party/skia/include/ports/SkTypeface_win.h" |
| 27 | 28 |
| 28 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 29 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
| 29 #include "v8/src/third_party/vtune/v8-vtune.h" | 30 #include "v8/src/third_party/vtune/v8-vtune.h" |
| 30 #endif | 31 #endif |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 53 base::string16(text, text_length)); | 54 base::string16(text, text_length)); |
| 54 } | 55 } |
| 55 } | 56 } |
| 56 | 57 |
| 57 void WarmupDirectWrite() { | 58 void WarmupDirectWrite() { |
| 58 // The objects used here are intentionally not freed as we want the Skia | 59 // The objects used here are intentionally not freed as we want the Skia |
| 59 // code to use these objects after warmup. | 60 // code to use these objects after warmup. |
| 60 SkTypeface* typeface = | 61 SkTypeface* typeface = |
| 61 GetPreSandboxWarmupFontMgr()->legacyCreateTypeface("Times New Roman", 0); | 62 GetPreSandboxWarmupFontMgr()->legacyCreateTypeface("Times New Roman", 0); |
| 62 DoPreSandboxWarmupForTypeface(typeface); | 63 DoPreSandboxWarmupForTypeface(typeface); |
| 64 SetDefaultSkiaFactory(GetPreSandboxWarmupFontMgr()); | |
|
scottmg
2014/06/18 19:08:31
this has to be set from here rather than having th
| |
| 63 } | 65 } |
| 64 | 66 |
| 65 } // namespace | 67 } // namespace |
| 66 | 68 |
| 67 RendererMainPlatformDelegate::RendererMainPlatformDelegate( | 69 RendererMainPlatformDelegate::RendererMainPlatformDelegate( |
| 68 const MainFunctionParams& parameters) | 70 const MainFunctionParams& parameters) |
| 69 : parameters_(parameters), | 71 : parameters_(parameters), |
| 70 sandbox_test_module_(NULL) { | 72 sandbox_test_module_(NULL) { |
| 71 } | 73 } |
| 72 | 74 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 ::GetUserDefaultLangID(); | 126 ::GetUserDefaultLangID(); |
| 125 ::GetUserDefaultLCID(); | 127 ::GetUserDefaultLCID(); |
| 126 | 128 |
| 127 target_services->LowerToken(); | 129 target_services->LowerToken(); |
| 128 return true; | 130 return true; |
| 129 } | 131 } |
| 130 return false; | 132 return false; |
| 131 } | 133 } |
| 132 | 134 |
| 133 } // namespace content | 135 } // namespace content |
| OLD | NEW |