• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2021-2022 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // WindowSurfaceVkWayland.h:
7 //    Defines the class interface for WindowSurfaceVkWayland, implementing WindowSurfaceVk.
8 //
9 
10 #ifndef LIBANGLE_RENDERER_VULKAN_WAYLAND_WINDOWSURFACEVKWAYLAND_H_
11 #define LIBANGLE_RENDERER_VULKAN_WAYLAND_WINDOWSURFACEVKWAYLAND_H_
12 
13 #include "libANGLE/renderer/vulkan/SurfaceVk.h"
14 
15 struct wl_display;
16 struct wl_egl_window;
17 
18 namespace rx
19 {
20 
21 class WindowSurfaceVkWayland : public WindowSurfaceVk
22 {
23   public:
24     static void ResizeCallback(wl_egl_window *window, void *payload);
25 
26     WindowSurfaceVkWayland(const egl::SurfaceState &surfaceState,
27                            EGLNativeWindowType window,
28                            wl_display *display);
29 
30   private:
31     angle::Result createSurfaceVk(vk::Context *context, gl::Extents *extentsOut) override;
32     angle::Result getCurrentWindowSize(vk::Context *context, gl::Extents *extentsOut) override;
33 
34     wl_display *mWaylandDisplay;
35     gl::Extents mExtents;
36 };
37 
38 }  // namespace rx
39 
40 #endif  // LIBANGLE_RENDERER_VULKAN_WAYLAND_WINDOWSURFACEVKWAYLAND_H_
41