Flutter Engine
The Flutter Engine
Public Attributes | List of all members
FlutterVulkanRendererConfig Struct Reference

#include <embedder.h>

Public Attributes

size_t struct_size
 The size of this struct. Must be sizeof(FlutterVulkanRendererConfig). More...
 
uint32_t version
 
FlutterVulkanInstanceHandle instance
 
FlutterVulkanPhysicalDeviceHandle physical_device
 VkPhysicalDevice handle. More...
 
FlutterVulkanDeviceHandle device
 
uint32_t queue_family_index
 The queue family index of the VkQueue supplied in the next field. More...
 
FlutterVulkanQueueHandle queue
 
size_t enabled_instance_extension_count
 
const char ** enabled_instance_extensions
 
size_t enabled_device_extension_count
 
const char ** enabled_device_extensions
 
FlutterVulkanInstanceProcAddressCallback get_instance_proc_address_callback
 
FlutterVulkanImageCallback get_next_image_callback
 
FlutterVulkanPresentCallback present_image_callback
 

Detailed Description

Definition at line 750 of file embedder.h.

Member Data Documentation

◆ device

FlutterVulkanDeviceHandle FlutterVulkanRendererConfig::device

VkDevice handle. Must not be destroyed before FlutterEngineShutdown is called.

Definition at line 764 of file embedder.h.

◆ enabled_device_extension_count

size_t FlutterVulkanRendererConfig::enabled_device_extension_count

The number of device extensions available for enumerating in the next field.

Definition at line 786 of file embedder.h.

◆ enabled_device_extensions

const char** FlutterVulkanRendererConfig::enabled_device_extensions

Array of enabled logical device extension names. This should match the names passed to VkDeviceCreateInfo.ppEnabledExtensionNames when the logical device was created, but any subset of enabled logical device extensions may be specified. This field is optional; nullptr may be specified. This memory is only accessed during the call to FlutterEngineInitialize. For example: VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME

Definition at line 794 of file embedder.h.

◆ enabled_instance_extension_count

size_t FlutterVulkanRendererConfig::enabled_instance_extension_count

The number of instance extensions available for enumerating in the next field.

Definition at line 776 of file embedder.h.

◆ enabled_instance_extensions

const char** FlutterVulkanRendererConfig::enabled_instance_extensions

Array of enabled instance extension names. This should match the names passed to VkInstanceCreateInfo.ppEnabledExtensionNames when the instance was created, but any subset of enabled instance extensions may be specified. This field is optional; nullptr may be specified. This memory is only accessed during the call to FlutterEngineInitialize.

Definition at line 783 of file embedder.h.

◆ get_instance_proc_address_callback

FlutterVulkanInstanceProcAddressCallback FlutterVulkanRendererConfig::get_instance_proc_address_callback

The callback invoked when resolving Vulkan function pointers. At a bare minimum this should be used to swap out any calls that operate on vkQueue's for threadsafe variants that obtain locks for their duration. The functions to swap out are "vkQueueSubmit" and "vkQueueWaitIdle". An example of how to do that can be found in the test "EmbedderTest.CanSwapOutVulkanCalls" unit-test in //shell/platform/embedder/tests/embedder_vk_unittests.cc.

Definition at line 802 of file embedder.h.

◆ get_next_image_callback

FlutterVulkanImageCallback FlutterVulkanRendererConfig::get_next_image_callback

The callback invoked when the engine requests a VkImage from the embedder for rendering the next frame. Not used if a FlutterCompositor is supplied in FlutterProjectArgs.

Definition at line 806 of file embedder.h.

◆ instance

FlutterVulkanInstanceHandle FlutterVulkanRendererConfig::instance

VkInstance handle. Must not be destroyed before FlutterEngineShutdown is called.

Definition at line 759 of file embedder.h.

◆ physical_device

FlutterVulkanPhysicalDeviceHandle FlutterVulkanRendererConfig::physical_device

VkPhysicalDevice handle.

Definition at line 761 of file embedder.h.

◆ present_image_callback

FlutterVulkanPresentCallback FlutterVulkanRendererConfig::present_image_callback

The callback invoked when a VkImage has been written to and is ready for use by the embedder. Prior to calling this callback, the engine performs a host sync, and so the VkImage can be used in a pipeline by the embedder without any additional synchronization. Not used if a FlutterCompositor is supplied in FlutterProjectArgs.

Definition at line 812 of file embedder.h.

◆ queue

FlutterVulkanQueueHandle FlutterVulkanRendererConfig::queue

VkQueue handle. The queue should not be used without protection from a mutex to make sure it is not used simultaneously with other threads. That mutex should match the one injected via the |get_instance_proc_address_callback|. There is a proposal to remove the need for the mutex at https://github.com/flutter/flutter/issues/134573.

Definition at line 773 of file embedder.h.

◆ queue_family_index

uint32_t FlutterVulkanRendererConfig::queue_family_index

The queue family index of the VkQueue supplied in the next field.

Definition at line 766 of file embedder.h.

◆ struct_size

size_t FlutterVulkanRendererConfig::struct_size

The size of this struct. Must be sizeof(FlutterVulkanRendererConfig).

Definition at line 752 of file embedder.h.

◆ version

uint32_t FlutterVulkanRendererConfig::version

The Vulkan API version. This should match the value set in VkApplicationInfo::apiVersion when the VkInstance was created.

Definition at line 756 of file embedder.h.


The documentation for this struct was generated from the following file: