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

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

Issue 1714263002: Version of MessagePumpForUI optimized for GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added CallMsgFilter call Created 4 years, 8 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 <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // channel error. If the IPC channel is not fully set up between the 177 // channel error. If the IPC channel is not fully set up between the
178 // browser and GPU process, and the GPU process crashes or exits 178 // browser and GPU process, and the GPU process crashes or exits
179 // early, the browser process will never detect it. For this reason 179 // early, the browser process will never detect it. For this reason
180 // we defer tearing down the GPU process until receiving the 180 // we defer tearing down the GPU process until receiving the
181 // GpuMsg_Initialize message from the browser. 181 // GpuMsg_Initialize message from the browser.
182 bool dead_on_arrival = false; 182 bool dead_on_arrival = false;
183 183
184 #if defined(OS_WIN) 184 #if defined(OS_WIN)
185 // Use a UI message loop because ANGLE and the desktop GL platform can 185 // Use a UI message loop because ANGLE and the desktop GL platform can
186 // create child windows to render to. 186 // create child windows to render to.
187 base::MessagePumpForGpu::InitFactory();
187 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); 188 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
188 #elif defined(OS_LINUX) && defined(USE_X11) 189 #elif defined(OS_LINUX) && defined(USE_X11)
189 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX 190 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
190 // and https://crbug.com/326995. 191 // and https://crbug.com/326995.
191 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); 192 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
192 std::unique_ptr<ui::PlatformEventSource> event_source = 193 std::unique_ptr<ui::PlatformEventSource> event_source =
193 ui::PlatformEventSource::CreateDefault(); 194 ui::PlatformEventSource::CreateDefault();
194 #elif defined(OS_LINUX) 195 #elif defined(OS_LINUX)
195 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); 196 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
196 #elif defined(OS_MACOSX) 197 #elif defined(OS_MACOSX)
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 return true; 585 return true;
585 } 586 }
586 587
587 return false; 588 return false;
588 } 589 }
589 #endif // defined(OS_WIN) 590 #endif // defined(OS_WIN)
590 591
591 } // namespace. 592 } // namespace.
592 593
593 } // namespace content 594 } // 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