| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // channel error. If the IPC channel is not fully set up between the | 184 // channel error. If the IPC channel is not fully set up between the |
| 185 // browser and GPU process, and the GPU process crashes or exits | 185 // browser and GPU process, and the GPU process crashes or exits |
| 186 // early, the browser process will never detect it. For this reason | 186 // early, the browser process will never detect it. For this reason |
| 187 // we defer tearing down the GPU process until receiving the | 187 // we defer tearing down the GPU process until receiving the |
| 188 // GpuMsg_Initialize message from the browser. | 188 // GpuMsg_Initialize message from the browser. |
| 189 bool dead_on_arrival = false; | 189 bool dead_on_arrival = false; |
| 190 | 190 |
| 191 #if defined(OS_WIN) | 191 #if defined(OS_WIN) |
| 192 // Use a UI message loop because ANGLE and the desktop GL platform can | 192 // Use a UI message loop because ANGLE and the desktop GL platform can |
| 193 // create child windows to render to. | 193 // create child windows to render to. |
| 194 base::MessagePumpForGpu::InitFactory(); |
| 194 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | 195 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); |
| 195 #elif defined(OS_LINUX) && defined(USE_X11) | 196 #elif defined(OS_LINUX) && defined(USE_X11) |
| 196 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX | 197 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX |
| 197 // and https://crbug.com/326995. | 198 // and https://crbug.com/326995. |
| 198 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | 199 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); |
| 199 std::unique_ptr<ui::PlatformEventSource> event_source = | 200 std::unique_ptr<ui::PlatformEventSource> event_source = |
| 200 ui::PlatformEventSource::CreateDefault(); | 201 ui::PlatformEventSource::CreateDefault(); |
| 201 #elif defined(OS_LINUX) | 202 #elif defined(OS_LINUX) |
| 202 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); | 203 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); |
| 203 #elif defined(OS_MACOSX) | 204 #elif defined(OS_MACOSX) |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 return true; | 618 return true; |
| 618 } | 619 } |
| 619 | 620 |
| 620 return false; | 621 return false; |
| 621 } | 622 } |
| 622 #endif // defined(OS_WIN) | 623 #endif // defined(OS_WIN) |
| 623 | 624 |
| 624 } // namespace. | 625 } // namespace. |
| 625 | 626 |
| 626 } // namespace content | 627 } // namespace content |
| OLD | NEW |