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

Unified 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: Change to use #define Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/BUILD.gn ('k') | ui/events/platform/x11/x11_event_source_libevent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index e76234bf3decc27388333f493c06000123f038d6..37139fb208810d5cac4fc32d1a796f67cea34065 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -168,7 +168,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHelper {
DISALLOW_COPY_AND_ASSIGN(ContentSandboxHelper);
};
-} // namespace anonymous
+} // namespace
// Main function for starting the Gpu process.
int GpuMain(const MainFunctionParams& parameters) {
@@ -210,14 +210,20 @@ int GpuMain(const MainFunctionParams& parameters) {
// create child windows to render to.
base::MessagePumpForGpu::InitFactory();
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
-#elif defined(OS_LINUX) && defined(USE_X11)
+#elif defined(USE_X11)
// We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
// and https://crbug.com/326995.
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
std::unique_ptr<ui::PlatformEventSource> event_source =
ui::PlatformEventSource::CreateDefault();
-#elif defined(OS_LINUX)
+#elif defined(USE_OZONE) && defined(OZONE_X11)
+ // If we might be running Ozone X11 we need a UI loop to grab Expose events.
+ // See GLSurfaceGLX and https://crbug.com/326995.
+ base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
+#elif defined(USE_OZONE)
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
+#elif defined(OS_LINUX)
+#error "Unsupported Linux platform."
#elif defined(OS_MACOSX)
// This is necessary for CoreAnimation layers hosted in the GPU process to be
// drawn. See http://crbug.com/312462.
« no previous file with comments | « content/gpu/BUILD.gn ('k') | ui/events/platform/x11/x11_event_source_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698