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

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 nested #ifdefs 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') | 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 <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);
148 #elif defined(OS_LINUX) && defined(USE_X11)
149 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
150 // and https://crbug.com/326995.
151 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
152 scoped_ptr<ui::PlatformEventSource> event_source =
153 ui::PlatformEventSource::CreateDefault();
147 #elif defined(OS_LINUX) 154 #elif defined(OS_LINUX)
148 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); 155 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
149 #elif defined(OS_MACOSX) 156 #elif defined(OS_MACOSX)
150 // This is necessary for CoreAnimation layers hosted in the GPU process to be 157 // This is necessary for CoreAnimation layers hosted in the GPU process to be
151 // drawn. See http://crbug.com/312462. 158 // drawn. See http://crbug.com/312462.
152 scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop()); 159 scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop());
153 base::MessageLoop main_message_loop(pump.Pass()); 160 base::MessageLoop main_message_loop(pump.Pass());
154 #else 161 #else
155 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO); 162 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO);
156 #endif 163 #endif
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 return true; 468 return true;
462 } 469 }
463 470
464 return false; 471 return false;
465 } 472 }
466 #endif // defined(OS_WIN) 473 #endif // defined(OS_WIN)
467 474
468 } // namespace. 475 } // namespace.
469 476
470 } // namespace content 477 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/gl/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698