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

Unified Diff: ui/ozone/platform/x11/ozone_platform_x11.cc

Issue 1723303002: Implement GLX for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/x11/ozone_platform_x11.cc
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
index 7863f8001e9686ec25e0406ab07f4fb557c69748..c628abd6f3417775b4989011e5c0cc9819c358ca 100644
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -92,7 +92,8 @@ class OzonePlatformX11 : public OzonePlatform {
void InitializeUI() override {
window_manager_.reset(new X11WindowManagerOzone);
- event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay()));
+ if (!event_source_)
+ event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay()));
overlay_manager_.reset(new StubOverlayManager());
input_controller_ = CreateStubInputController();
cursor_factory_ozone_.reset(new X11CursorFactoryOzone());
@@ -100,6 +101,8 @@ class OzonePlatformX11 : public OzonePlatform {
}
void InitializeGPU() override {
+ if (!event_source_)
sadrul 2016/04/19 14:49:49 The null-check here (and above) implies we may be
kylechar 2016/04/19 16:00:20 Yep. In MUS they are both in the same process.
sadrul 2016/04/19 16:13:37 Oh, that's interesting. PlatformEventSource (and
+ event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay()));
surface_factory_ozone_.reset(new X11SurfaceFactory());
gpu_platform_support_.reset(CreateStubGpuPlatformSupport());
}
@@ -107,7 +110,6 @@ class OzonePlatformX11 : public OzonePlatform {
private:
// Objects in the Browser process.
scoped_ptr<X11WindowManagerOzone> window_manager_;
- scoped_ptr<X11EventSourceLibevent> event_source_;
scoped_ptr<OverlayManagerOzone> overlay_manager_;
scoped_ptr<InputController> input_controller_;
scoped_ptr<X11CursorFactoryOzone> cursor_factory_ozone_;
@@ -117,6 +119,9 @@ class OzonePlatformX11 : public OzonePlatform {
scoped_ptr<X11SurfaceFactory> surface_factory_ozone_;
scoped_ptr<GpuPlatformSupport> gpu_platform_support_;
+ // Objects in both Browser and GPU process.
+ scoped_ptr<X11EventSourceLibevent> event_source_;
+
DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11);
};

Powered by Google App Engine
This is Rietveld 408576698