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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_IO; | 139 base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_IO; |
140 #if defined(OS_WIN) | 140 #if defined(OS_WIN) |
141 // Unless we're running on desktop GL, we don't need a UI message | 141 // Unless we're running on desktop GL, we don't need a UI message |
142 // loop, so avoid its use to work around apparent problems with some | 142 // loop, so avoid its use to work around apparent problems with some |
143 // third-party software. | 143 // third-party software. |
144 if (command_line.HasSwitch(switches::kUseGL) && | 144 if (command_line.HasSwitch(switches::kUseGL) && |
145 command_line.GetSwitchValueASCII(switches::kUseGL) == | 145 command_line.GetSwitchValueASCII(switches::kUseGL) == |
146 gfx::kGLImplementationDesktopName) { | 146 gfx::kGLImplementationDesktopName) { |
147 message_loop_type = base::MessageLoop::TYPE_UI; | 147 message_loop_type = base::MessageLoop::TYPE_UI; |
148 } | 148 } |
| 149 #elif defined(TOOLKIT_GTK) |
| 150 message_loop_type = base::MessageLoop::TYPE_GPU; |
149 #elif defined(OS_LINUX) | 151 #elif defined(OS_LINUX) |
150 message_loop_type = base::MessageLoop::TYPE_DEFAULT; | 152 message_loop_type = base::MessageLoop::TYPE_DEFAULT; |
151 #endif | 153 #endif |
152 | 154 |
153 base::MessageLoop main_message_loop(message_loop_type); | 155 base::MessageLoop main_message_loop(message_loop_type); |
154 base::PlatformThread::SetName("CrGpuMain"); | 156 base::PlatformThread::SetName("CrGpuMain"); |
155 | 157 |
156 // In addition to disabling the watchdog if the command line switch is | 158 // In addition to disabling the watchdog if the command line switch is |
157 // present, disable the watchdog on valgrind because the code is expected | 159 // present, disable the watchdog on valgrind because the code is expected |
158 // to run slowly in that case. | 160 // to run slowly in that case. |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 return true; | 449 return true; |
448 } | 450 } |
449 | 451 |
450 return false; | 452 return false; |
451 } | 453 } |
452 #endif // defined(OS_WIN) | 454 #endif // defined(OS_WIN) |
453 | 455 |
454 } // namespace. | 456 } // namespace. |
455 | 457 |
456 } // namespace content | 458 } // namespace content |
OLD | NEW |