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

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

Issue 2705333006: Move client_native_pixmap_factory.h from ui/ozone/public to ui/gfx (Closed)
Patch Set: Fix trace Created 3 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 unified diff | Download patch
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 <stddef.h> 5 #include <stddef.h>
6 #include <utility> 6 #include <utility>
7 7
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/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 #if BUILDFLAG(ENABLE_PLUGINS) 53 #if BUILDFLAG(ENABLE_PLUGINS)
54 #include "content/renderer/pepper/pepper_plugin_registry.h" 54 #include "content/renderer/pepper/pepper_plugin_registry.h"
55 #endif 55 #endif
56 56
57 #if BUILDFLAG(ENABLE_WEBRTC) 57 #if BUILDFLAG(ENABLE_WEBRTC)
58 #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck 58 #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck
59 #endif 59 #endif
60 60
61 #if defined(USE_OZONE) 61 #if defined(USE_OZONE)
62 #include "ui/ozone/public/client_native_pixmap_factory.h" 62 #include "ui/ozone/public/client_native_pixmap_factory_ozone.h"
63 #endif 63 #endif
64 64
65 namespace content { 65 namespace content {
66 namespace { 66 namespace {
67 // This function provides some ways to test crash and assertion handling 67 // This function provides some ways to test crash and assertion handling
68 // behavior of the renderer. 68 // behavior of the renderer.
69 static void HandleRendererErrorTestParameters( 69 static void HandleRendererErrorTestParameters(
70 const base::CommandLine& command_line) { 70 const base::CommandLine& command_line) {
71 if (command_line.HasSwitch(switches::kWaitForDebugger)) 71 if (command_line.HasSwitch(switches::kWaitForDebugger))
72 base::debug::WaitForDebugger(60, true); 72 base::debug::WaitForDebugger(60, true);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 SkGraphics::Init(); 113 SkGraphics::Init();
114 #if defined(OS_ANDROID) 114 #if defined(OS_ANDROID)
115 const int kMB = 1024 * 1024; 115 const int kMB = 1024 * 1024;
116 size_t font_cache_limit = 116 size_t font_cache_limit =
117 base::SysInfo::IsLowEndDevice() ? kMB : 8 * kMB; 117 base::SysInfo::IsLowEndDevice() ? kMB : 8 * kMB;
118 SkGraphics::SetFontCacheLimit(font_cache_limit); 118 SkGraphics::SetFontCacheLimit(font_cache_limit);
119 #endif 119 #endif
120 120
121 #if defined(USE_OZONE) 121 #if defined(USE_OZONE)
122 g_pixmap_factory.Get() = ui::ClientNativePixmapFactory::Create(); 122 g_pixmap_factory.Get() = ui::CreateClientNativePixmapFactoryOzone();
123 ui::ClientNativePixmapFactory::SetInstance(g_pixmap_factory.Get().get()); 123 ui::ClientNativePixmapFactory::SetInstance(g_pixmap_factory.Get().get());
124 #endif 124 #endif
125 125
126 // This function allows pausing execution using the --renderer-startup-dialog 126 // This function allows pausing execution using the --renderer-startup-dialog
127 // flag allowing us to attach a debugger. 127 // flag allowing us to attach a debugger.
128 // Do not move this function down since that would mean we can't easily debug 128 // Do not move this function down since that would mean we can't easily debug
129 // whatever occurs before it. 129 // whatever occurs before it.
130 HandleRendererErrorTestParameters(parsed_command_line); 130 HandleRendererErrorTestParameters(parsed_command_line);
131 131
132 RendererMainPlatformDelegate platform(parameters); 132 RendererMainPlatformDelegate platform(parameters);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // ignore shutdown-only leaks. 206 // ignore shutdown-only leaks.
207 __lsan_do_leak_check(); 207 __lsan_do_leak_check();
208 #endif 208 #endif
209 } 209 }
210 platform.PlatformUninitialize(); 210 platform.PlatformUninitialize();
211 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); 211 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0);
212 return 0; 212 return 0;
213 } 213 }
214 214
215 } // namespace content 215 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698