1 // 2 // Copyright 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 // DisplayVkGbm.h: 7 // Defines the class interface for DisplayVkGbm, implementing DisplayVk for GBM. 8 // 9 10 #ifndef LIBANGLE_RENDERER_VULKAN_GBM_DISPLAYVKGBM_H_ 11 #define LIBANGLE_RENDERER_VULKAN_GBM_DISPLAYVKGBM_H_ 12 13 #include "libANGLE/renderer/vulkan/linux/DisplayVkLinux.h" 14 15 struct gbm_device; 16 17 namespace rx 18 { 19 20 class DisplayVkGbm : public DisplayVkLinux 21 { 22 public: 23 DisplayVkGbm(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::NativeWindowSystem getWindowSystem() const override; 38 39 private: 40 gbm_device *mGbmDevice; 41 }; 42 43 } // namespace rx 44 45 #endif // LIBANGLE_RENDERER_VULKAN_GBM_DISPLAYVKGBM_H_ 46