1 // 2 // Copyright 2018 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 // DisplayVkAndroid.h: 7 // Defines the class interface for DisplayVkAndroid, implementing DisplayVk for Android. 8 // 9 10 #ifndef LIBANGLE_RENDERER_VULKAN_ANDROID_DISPLAYVKANDROID_H_ 11 #define LIBANGLE_RENDERER_VULKAN_ANDROID_DISPLAYVKANDROID_H_ 12 13 #include "libANGLE/renderer/vulkan/DisplayVk.h" 14 #include "libANGLE/renderer/vulkan/android/AHBFunctions.h" 15 16 namespace rx 17 { 18 class DisplayVkAndroid : public DisplayVk 19 { 20 public: 21 DisplayVkAndroid(const egl::DisplayState &state); 22 23 egl::Error initialize(egl::Display *display) override; 24 25 bool isValidNativeWindow(EGLNativeWindowType window) const override; 26 27 SurfaceImpl *createWindowSurfaceVk(const egl::SurfaceState &state, 28 EGLNativeWindowType window) override; 29 30 egl::ConfigSet generateConfigs() override; 31 void checkConfigSupport(egl::Config *config) override; 32 33 egl::Error validateImageClientBuffer(const gl::Context *context, 34 EGLenum target, 35 EGLClientBuffer clientBuffer, 36 const egl::AttributeMap &attribs) const override; 37 38 ExternalImageSiblingImpl *createExternalImageSibling(const gl::Context *context, 39 EGLenum target, 40 EGLClientBuffer buffer, 41 const egl::AttributeMap &attribs) override; 42 43 const char *getWSIExtension() const override; 44 getAHBFunctions()45 const AHBFunctions &getAHBFunctions() const { return mAHBFunctions; } 46 47 private: 48 void enableRecordableIfSupported(egl::Config *config); 49 50 AHBFunctions mAHBFunctions; 51 }; 52 53 } // namespace rx 54 55 #endif // LIBANGLE_RENDERER_VULKAN_ANDROID_DISPLAYVKANDROID_H_ 56