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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 10806019: Merge 143263 - Change GPU process to use IO rather than UI MessageLoop on Mac OS. On this platform,… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 5 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 parameters.sandbox_info->target_services; 125 parameters.sandbox_info->target_services;
126 // Initialize H/W video decoding stuff which fails in the sandbox. 126 // Initialize H/W video decoding stuff which fails in the sandbox.
127 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); 127 DXVAVideoDecodeAccelerator::PreSandboxInitialization();
128 // For windows, if the target_services interface is not zero, the process 128 // For windows, if the target_services interface is not zero, the process
129 // is sandboxed and we must call LowerToken() before rendering untrusted 129 // is sandboxed and we must call LowerToken() before rendering untrusted
130 // content. 130 // content.
131 if (target_services) 131 if (target_services)
132 target_services->LowerToken(); 132 target_services->LowerToken();
133 #endif 133 #endif
134 134
135 MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI; 135 MessageLoop::Type message_loop_type = MessageLoop::TYPE_IO;
136 #if defined(OS_WIN) 136 #if defined(OS_WIN)
137 // Unless we're running on desktop GL, we don't need a UI message 137 // Unless we're running on desktop GL, we don't need a UI message
138 // loop, so avoid its use to work around apparent problems with some 138 // loop, so avoid its use to work around apparent problems with some
139 // third-party software. 139 // third-party software.
140 message_loop_type = MessageLoop::TYPE_IO;
141 if (command_line.HasSwitch(switches::kUseGL) && 140 if (command_line.HasSwitch(switches::kUseGL) &&
142 command_line.GetSwitchValueASCII(switches::kUseGL) == 141 command_line.GetSwitchValueASCII(switches::kUseGL) ==
143 gfx::kGLImplementationDesktopName) { 142 gfx::kGLImplementationDesktopName) {
144 message_loop_type = MessageLoop::TYPE_UI; 143 message_loop_type = MessageLoop::TYPE_UI;
145 } 144 }
146 #elif defined(OS_LINUX) 145 #elif defined(OS_LINUX)
147 message_loop_type = MessageLoop::TYPE_DEFAULT; 146 message_loop_type = MessageLoop::TYPE_DEFAULT;
148 #endif 147 #endif
149 148
150 MessageLoop main_message_loop(message_loop_type); 149 MessageLoop main_message_loop(message_loop_type);
151 base::PlatformThread::SetName("CrGpuMain"); 150 base::PlatformThread::SetName("CrGpuMain");
152 151
153 GpuProcess gpu_process; 152 GpuProcess gpu_process;
154 153
155 GpuChildThread* child_thread = new GpuChildThread(dead_on_arrival, gpu_info); 154 GpuChildThread* child_thread = new GpuChildThread(dead_on_arrival, gpu_info);
156 155
157 child_thread->Init(start_time); 156 child_thread->Init(start_time);
158 157
159 gpu_process.set_main_thread(child_thread); 158 gpu_process.set_main_thread(child_thread);
160 159
161 main_message_loop.Run(); 160 main_message_loop.Run();
162 161
163 child_thread->StopWatchdog(); 162 child_thread->StopWatchdog();
164 163
165 return 0; 164 return 0;
166 } 165 }
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