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

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

Issue 1602173005: Add PlatformWindow/Event related code for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fixes. Created 4 years, 11 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/x11_surface_factory.cc
diff --git a/ui/ozone/platform/x11/x11_surface_factory.cc b/ui/ozone/platform/x11/x11_surface_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e2f9f0fb453a928f346514c4a3c54af877d6dcc9
--- /dev/null
+++ b/ui/ozone/platform/x11/x11_surface_factory.cc
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/ozone/platform/x11/x11_surface_factory.h"
+
+#include <X11/Xlib.h>
+
+#include <utility>
+
+#include "base/macros.h"
+#include "third_party/khronos/EGL/egl.h"
+#include "ui/gfx/x/x11_types.h"
+#include "ui/ozone/common/egl_util.h"
+
+namespace ui {
+
+X11SurfaceFactory::X11SurfaceFactory(
+ scoped_refptr<X11WindowHostManager> window_manager)
+ : window_manager_(window_manager) {}
+
+X11SurfaceFactory::~X11SurfaceFactory() {}
+
+bool X11SurfaceFactory::LoadEGLGLES2Bindings(
+ AddGLLibraryCallback add_gl_library,
+ SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
+ return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address);
+}
+
+intptr_t X11SurfaceFactory::GetNativeDisplay() {
+ return reinterpret_cast<intptr_t>(gfx::GetXDisplay());
+}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698