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

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

Issue 299143002: glx: forward Expose event from child window to parent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gl/DEPS » ('j') | ui/gl/gl_surface_glx.cc » ('J')
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 <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 14 matching lines...) Expand all
25 #include "content/common/sandbox_linux/sandbox_linux.h" 25 #include "content/common/sandbox_linux/sandbox_linux.h"
26 #include "content/gpu/gpu_child_thread.h" 26 #include "content/gpu/gpu_child_thread.h"
27 #include "content/gpu/gpu_process.h" 27 #include "content/gpu/gpu_process.h"
28 #include "content/gpu/gpu_watchdog_thread.h" 28 #include "content/gpu/gpu_watchdog_thread.h"
29 #include "content/public/common/content_client.h" 29 #include "content/public/common/content_client.h"
30 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
31 #include "content/public/common/main_function_params.h" 31 #include "content/public/common/main_function_params.h"
32 #include "gpu/command_buffer/service/gpu_switches.h" 32 #include "gpu/command_buffer/service/gpu_switches.h"
33 #include "gpu/config/gpu_info_collector.h" 33 #include "gpu/config/gpu_info_collector.h"
34 #include "gpu/config/gpu_util.h" 34 #include "gpu/config/gpu_util.h"
35 #include "ui/events/platform/platform_event_source.h"
35 #include "ui/gl/gl_implementation.h" 36 #include "ui/gl/gl_implementation.h"
36 #include "ui/gl/gl_surface.h" 37 #include "ui/gl/gl_surface.h"
37 #include "ui/gl/gl_switches.h" 38 #include "ui/gl/gl_switches.h"
38 #include "ui/gl/gpu_switching_manager.h" 39 #include "ui/gl/gpu_switching_manager.h"
39 40
40 #if defined(OS_WIN) 41 #if defined(OS_WIN)
41 #include "base/win/windows_version.h" 42 #include "base/win/windows_version.h"
42 #include "base/win/scoped_com_initializer.h" 43 #include "base/win/scoped_com_initializer.h"
43 #include "sandbox/win/src/sandbox.h" 44 #include "sandbox/win/src/sandbox.h"
44 #endif 45 #endif
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_IO; 138 base::MessageLoop::Type message_loop_type = base::MessageLoop::TYPE_IO;
138 // Unless we're running on desktop GL, we don't need a UI message 139 // Unless we're running on desktop GL, we don't need a UI message
139 // loop, so avoid its use to work around apparent problems with some 140 // loop, so avoid its use to work around apparent problems with some
140 // third-party software. 141 // third-party software.
141 if (command_line.HasSwitch(switches::kUseGL) && 142 if (command_line.HasSwitch(switches::kUseGL) &&
142 command_line.GetSwitchValueASCII(switches::kUseGL) == 143 command_line.GetSwitchValueASCII(switches::kUseGL) ==
143 gfx::kGLImplementationDesktopName) { 144 gfx::kGLImplementationDesktopName) {
144 message_loop_type = base::MessageLoop::TYPE_UI; 145 message_loop_type = base::MessageLoop::TYPE_UI;
145 } 146 }
146 base::MessageLoop main_message_loop(message_loop_type); 147 base::MessageLoop main_message_loop(message_loop_type);
147 #elif defined(OS_LINUX) 148 #elif defined(OS_LINUX)
ccameron 2014/05/23 09:12:00 Maybe avoid nested #if and use ignore_result for t
piman 2014/05/23 10:09:48 I don't want to ignore_result, we need to keep the
piman 2014/05/23 20:47:53 Done.
148 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); 149 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
150 #if defined(USE_X11)
151 scoped_ptr<ui::PlatformEventSource> event_source =
152 ui::PlatformEventSource::CreateDefault();
153 #endif
149 #elif defined(OS_MACOSX) 154 #elif defined(OS_MACOSX)
150 // This is necessary for CoreAnimation layers hosted in the GPU process to be 155 // This is necessary for CoreAnimation layers hosted in the GPU process to be
151 // drawn. See http://crbug.com/312462. 156 // drawn. See http://crbug.com/312462.
152 scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop()); 157 scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop());
153 base::MessageLoop main_message_loop(pump.Pass()); 158 base::MessageLoop main_message_loop(pump.Pass());
154 #else 159 #else
155 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO); 160 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO);
156 #endif 161 #endif
157 162
158 base::PlatformThread::SetName("CrGpuMain"); 163 base::PlatformThread::SetName("CrGpuMain");
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 return true; 466 return true;
462 } 467 }
463 468
464 return false; 469 return false;
465 } 470 }
466 #endif // defined(OS_WIN) 471 #endif // defined(OS_WIN)
467 472
468 } // namespace. 473 } // namespace.
469 474
470 } // namespace content 475 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/gl/DEPS » ('j') | ui/gl/gl_surface_glx.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698