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 |