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

Unified Diff: ui/ozone/platform/wayland/gl_surface_wayland.h

Issue 2187443003: Convert Ozone wayland to directly create GLSurfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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/wayland/BUILD.gn ('k') | ui/ozone/platform/wayland/gl_surface_wayland.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/gl_surface_wayland.h
diff --git a/ui/ozone/platform/wayland/gl_surface_wayland.h b/ui/ozone/platform/wayland/gl_surface_wayland.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca27fbf7133e146dcd5e2587668800a7c3b7aedb
--- /dev/null
+++ b/ui/ozone/platform/wayland/gl_surface_wayland.h
@@ -0,0 +1,49 @@
+// 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.
+
+#ifndef UI_OZONE_PLATFORM_WAYLAND_GL_SURFACE_WAYLAND_H_
+#define UI_OZONE_PLATFORM_WAYLAND_GL_SURFACE_WAYLAND_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gl/gl_surface_egl.h"
+
+struct wl_egl_window;
+
+namespace ui {
+
+class WaylandWindow;
+
+struct EGLWindowDeleter {
+ void operator()(wl_egl_window* egl_window);
+};
+
+std::unique_ptr<wl_egl_window, EGLWindowDeleter> CreateWaylandEglWindow(
+ WaylandWindow* window);
+
+// GLSurface class implementation for wayland.
+class GLSurfaceWayland : public gl::NativeViewGLSurfaceEGL {
+ public:
+ using WaylandEglWindowPtr = std::unique_ptr<wl_egl_window, EGLWindowDeleter>;
+
+ explicit GLSurfaceWayland(WaylandEglWindowPtr egl_window);
+
+ // gl::GLSurface:
+ bool Resize(const gfx::Size& size,
+ float scale_factor,
+ bool has_alpha) override;
+ EGLConfig GetConfig() override;
+
+ private:
+ ~GLSurfaceWayland() override;
+
+ WaylandEglWindowPtr egl_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLSurfaceWayland);
+};
+
+} // namespace ui
+#endif // UI_OZONE_PLATFORM_WAYLAND_GL_SURFACE_WAYLAND_H_
« no previous file with comments | « ui/ozone/platform/wayland/BUILD.gn ('k') | ui/ozone/platform/wayland/gl_surface_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698