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

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

Issue 1723303002: Implement GLX for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase/refactor. Created 4 years, 9 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
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 #if defined(OS_WIN) 187 #if defined(OS_WIN)
188 // Use a UI message loop because ANGLE and the desktop GL platform can 188 // Use a UI message loop because ANGLE and the desktop GL platform can
189 // create child windows to render to. 189 // create child windows to render to.
190 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); 190 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
191 #elif defined(OS_LINUX) && defined(USE_X11) 191 #elif defined(OS_LINUX) && defined(USE_X11)
192 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX 192 // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
193 // and https://crbug.com/326995. 193 // and https://crbug.com/326995.
194 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); 194 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
195 scoped_ptr<ui::PlatformEventSource> event_source = 195 scoped_ptr<ui::PlatformEventSource> event_source =
196 ui::PlatformEventSource::CreateDefault(); 196 ui::PlatformEventSource::CreateDefault();
197 #elif defined(OS_LINUX) && defined(USE_OZONE)
198 // Ozone X11 needs a UI loop to grab Expose events. https://crbug.com/326995
199 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
197 #elif defined(OS_LINUX) 200 #elif defined(OS_LINUX)
198 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); 201 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
199 #elif defined(OS_MACOSX) 202 #elif defined(OS_MACOSX)
200 // This is necessary for CoreAnimation layers hosted in the GPU process to be 203 // This is necessary for CoreAnimation layers hosted in the GPU process to be
201 // drawn. See http://crbug.com/312462. 204 // drawn. See http://crbug.com/312462.
202 scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop()); 205 scoped_ptr<base::MessagePump> pump(new base::MessagePumpCFRunLoop());
203 base::MessageLoop main_message_loop(std::move(pump)); 206 base::MessageLoop main_message_loop(std::move(pump));
204 #else 207 #else
205 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO); 208 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_IO);
206 #endif 209 #endif
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 return true; 595 return true;
593 } 596 }
594 597
595 return false; 598 return false;
596 } 599 }
597 #endif // defined(OS_WIN) 600 #endif // defined(OS_WIN)
598 601
599 } // namespace. 602 } // namespace.
600 603
601 } // namespace content 604 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/events/platform/x11/x11_event_source_libevent.h » ('j') | ui/gl/gl_implementation_ozone.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698