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

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

Issue 1943063002: Version of MessagePumpForUI optimized for GPU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 4 years, 7 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
« no previous file with comments | « base/message_loop/message_pump_win.cc ('k') | 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 <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
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
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
OLDNEW
« no previous file with comments | « base/message_loop/message_pump_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698