1 //
2 // Copyright 2016 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 // DisplayVkXcb.h:
7 //    Defines the class interface for DisplayVkXcb, implementing DisplayVk for X via XCB.
8 //
9 
10 #ifndef LIBANGLE_RENDERER_VULKAN_XCB_DISPLAYVKXCB_H_
11 #define LIBANGLE_RENDERER_VULKAN_XCB_DISPLAYVKXCB_H_
12 
13 #include "libANGLE/renderer/vulkan/DisplayVk.h"
14 
15 struct xcb_connection_t;
16 
17 namespace rx
18 {
19 
20 class DisplayVkXcb : public DisplayVk
21 {
22   public:
23     DisplayVkXcb(const egl::DisplayState &state);
24 
25     egl::Error initialize(egl::Display *display) override;
26     void terminate() override;
27 
28     bool isValidNativeWindow(EGLNativeWindowType window) const override;
29 
30     SurfaceImpl *createWindowSurfaceVk(const egl::SurfaceState &state,
31                                        EGLNativeWindowType window) override;
32 
33     egl::ConfigSet generateConfigs() override;
34     void checkConfigSupport(egl::Config *config) override;
35 
36     const char *getWSIExtension() const override;
37     angle::Result waitNativeImpl() override;
38 
39   private:
40     xcb_connection_t *mXcbConnection;
41 };
42 
43 }  // namespace rx
44 
45 #endif  // LIBANGLE_RENDERER_VULKAN_XCB_DISPLAYVKXCB_H_
46