| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 SEM_NOGPFAULTERRORBOX | | 187 SEM_NOGPFAULTERRORBOX | |
| 188 SEM_NOOPENFILEERRORBOX); | 188 SEM_NOOPENFILEERRORBOX); |
| 189 #elif defined(USE_X11) | 189 #elif defined(USE_X11) |
| 190 ui::SetDefaultX11ErrorHandlers(); | 190 ui::SetDefaultX11ErrorHandlers(); |
| 191 | 191 |
| 192 #endif | 192 #endif |
| 193 | 193 |
| 194 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); | 194 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); |
| 195 | 195 |
| 196 #if defined(OS_WIN) | 196 #if defined(OS_WIN) |
| 197 // Use a UI message loop because ANGLE and the desktop GL platform can | 197 // OK to use default non-UI message loop because all GPU windows run on |
| 198 // create child windows to render to. | 198 // dedicated thread. |
| 199 base::MessagePumpForGpu::InitFactory(); | 199 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); |
| 200 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | |
| 201 #elif defined(USE_X11) | 200 #elif defined(USE_X11) |
| 202 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX | 201 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX |
| 203 // and https://crbug.com/326995. | 202 // and https://crbug.com/326995. |
| 204 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | 203 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); |
| 205 std::unique_ptr<ui::PlatformEventSource> event_source = | 204 std::unique_ptr<ui::PlatformEventSource> event_source = |
| 206 ui::PlatformEventSource::CreateDefault(); | 205 ui::PlatformEventSource::CreateDefault(); |
| 207 #elif defined(USE_OZONE) && defined(OZONE_X11) | 206 #elif defined(USE_OZONE) && defined(OZONE_X11) |
| 208 // If we might be running Ozone X11 we need a UI loop to grab Expose events. | 207 // If we might be running Ozone X11 we need a UI loop to grab Expose events. |
| 209 // See GLSurfaceGLX and https://crbug.com/326995. | 208 // See GLSurfaceGLX and https://crbug.com/326995. |
| 210 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | 209 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 return true; | 340 return true; |
| 342 } | 341 } |
| 343 | 342 |
| 344 return false; | 343 return false; |
| 345 } | 344 } |
| 346 #endif // defined(OS_WIN) | 345 #endif // defined(OS_WIN) |
| 347 | 346 |
| 348 } // namespace. | 347 } // namespace. |
| 349 | 348 |
| 350 } // namespace content | 349 } // namespace content |
| OLD | NEW |