xref: /aosp_15_r20/external/angle/src/libANGLE/renderer/vulkan/mac/WindowSurfaceVkMac.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2019 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 // WindowSurfaceVkMac.h:
7 //    Subclasses WindowSurfaceVk for the Mac platform.
8 //
9 
10 #ifndef LIBANGLE_RENDERER_VULKAN_MAC_WINDOWSURFACEVKMAC_H_
11 #define LIBANGLE_RENDERER_VULKAN_MAC_WINDOWSURFACEVKMAC_H_
12 
13 #include "libANGLE/renderer/vulkan/SurfaceVk.h"
14 
15 #include <Cocoa/Cocoa.h>
16 
17 namespace rx
18 {
19 
20 class WindowSurfaceVkMac : public WindowSurfaceVk
21 {
22   public:
23     WindowSurfaceVkMac(const egl::SurfaceState &surfaceState, EGLNativeWindowType window);
24     ~WindowSurfaceVkMac() override;
25 
26   private:
27     angle::Result createSurfaceVk(vk::Context *context, gl::Extents *extentsOut) override;
28     angle::Result getCurrentWindowSize(vk::Context *context, gl::Extents *extentsOut) override;
29 
30     CAMetalLayer *mMetalLayer;
31     id<MTLDevice> mMetalDevice;
32 };
33 
34 }  // namespace rx
35 
36 #endif  // LIBANGLE_RENDERER_VULKAN_MAC_WINDOWSURFACEVKMAC_H_
37