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

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: 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 | « ui/ozone/platform/x11/gl_surface_glx_ozone.cc ('k') | ui/ozone/platform/x11/x11_surface_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1219ee1caf5b0ad59fe1d94f5f23e479e1f6a637..cf53f7deba972a1e521a26032dc90d88bcd08076 100644
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -91,7 +91,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());
@@ -99,13 +100,14 @@ class OzonePlatformX11 : public OzonePlatform {
}
void InitializeGPU() override {
+ if (!event_source_)
+ event_source_.reset(new X11EventSourceLibevent(gfx::GetXDisplay()));
surface_factory_ozone_.reset(new X11SurfaceFactory());
}
private:
- // Objects in the Browser process.
+ // Objects in the browser process.
std::unique_ptr<X11WindowManagerOzone> window_manager_;
- std::unique_ptr<X11EventSourceLibevent> event_source_;
std::unique_ptr<OverlayManagerOzone> overlay_manager_;
std::unique_ptr<InputController> input_controller_;
std::unique_ptr<X11CursorFactoryOzone> cursor_factory_ozone_;
@@ -114,6 +116,9 @@ class OzonePlatformX11 : public OzonePlatform {
// Objects in the GPU process.
std::unique_ptr<X11SurfaceFactory> surface_factory_ozone_;
+ // Objects in both browser and GPU process.
+ std::unique_ptr<X11EventSourceLibevent> event_source_;
+
DISALLOW_COPY_AND_ASSIGN(OzonePlatformX11);
};
« no previous file with comments | « ui/ozone/platform/x11/gl_surface_glx_ozone.cc ('k') | ui/ozone/platform/x11/x11_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698