@@ -76,6 +76,7 @@ typedef enum {
7676 /// iOS version >= 10.0 (device), 13.0 (simulator)
7777 /// macOS version >= 10.14
7878 kMetal ,
79+ kVulkan ,
7980} FlutterRendererType ;
8081
8182/// Additional accessibility features that may be enabled by the platform.
@@ -541,6 +542,33 @@ typedef struct {
541542 FlutterMetalTextureFrameCallback external_texture_frame_callback ;
542543} FlutterMetalRendererConfig ;
543544
545+ typedef uintptr_t * (* FlutterVulkanGetNextImageCallback )(void * /* user data */ );
546+
547+ typedef void * (* ProcAddressCallback )(void * user /* in */ ,
548+ const char * pName /* in */ );
549+ typedef void * (* InstanceProcAddressCallback )(void * user /* in */ ,
550+ uintptr_t * instance /* in */ ,
551+ const char * pName /* in */ );
552+ typedef uintptr_t * (* UintPtrCallback )(void * user /* in */ );
553+
554+ typedef struct {
555+ /// The size of this struct. Must be sizeof(FlutterVulkanRendererConfig).
556+ size_t struct_size ;
557+
558+ void * user_data ;
559+
560+ /// Platform Callbacks
561+ ProcAddressCallback get_proc_address_callback ;
562+ InstanceProcAddressCallback get_instance_proc_address_callback ;
563+ UintPtrCallback get_instance_handle_callback ;
564+ UintPtrCallback get_physical_device_handle_callback ;
565+ UintPtrCallback get_device_handle_callback ;
566+
567+ FlutterVulkanGetNextImageCallback acquire_next_image_callback ;
568+ VoidCallback terminate_callback ;
569+
570+ } FlutterVulkanRendererConfig ;
571+
544572typedef struct {
545573 /// The size of this struct. Must be sizeof(FlutterSoftwareRendererConfig).
546574 size_t struct_size ;
@@ -557,6 +585,7 @@ typedef struct {
557585 FlutterOpenGLRendererConfig open_gl ;
558586 FlutterSoftwareRendererConfig software ;
559587 FlutterMetalRendererConfig metal ;
588+ FlutterVulkanRendererConfig vulkan ;
560589 };
561590} FlutterRendererConfig ;
562591
@@ -989,6 +1018,17 @@ typedef struct {
9891018 };
9901019} FlutterMetalBackingStore ;
9911020
1021+ typedef struct {
1022+ /// The size of this struct. Must be sizeof(FlutterVulkanBackingStore).
1023+ size_t struct_size ;
1024+
1025+ /// VkImage handle.
1026+ uint64_t handle ;
1027+
1028+ /// VkSemaphore signaled when engine is done writing image.
1029+ uint64_t image_ready ;
1030+ } FlutterVulkanBackingStore ;
1031+
9921032typedef enum {
9931033 /// Indicates that the Flutter application requested that an opacity be
9941034 /// applied to the platform view.
@@ -1048,6 +1088,8 @@ typedef enum {
10481088 kFlutterBackingStoreTypeSoftware ,
10491089 /// Specifies a Metal backing store. This is backed by a Metal texture.
10501090 kFlutterBackingStoreTypeMetal ,
1091+ /// Specifies a Vulkan backing store. This is backed by a Vulkan VkImage.
1092+ kFlutterBackingStoreTypeVulkan ,
10511093} FlutterBackingStoreType ;
10521094
10531095typedef struct {
@@ -1069,6 +1111,8 @@ typedef struct {
10691111 FlutterSoftwareBackingStore software ;
10701112 // The description of the Metal backing store.
10711113 FlutterMetalBackingStore metal ;
1114+ // The description of the Vulkan backing store.
1115+ FlutterVulkanBackingStore vulkan ;
10721116 };
10731117} FlutterBackingStore ;
10741118
0 commit comments