Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::testing::TestGPUSurfaceVulkanDelegate Class Reference
Inheritance diagram for flutter::testing::TestGPUSurfaceVulkanDelegate:
flutter::GPUSurfaceVulkanDelegate

Public Member Functions

 TestGPUSurfaceVulkanDelegate ()
 
const vulkan::VulkanProcTablevk () override
 Obtain a reference to the Vulkan implementation's proc table.
 
FlutterVulkanImage AcquireImage (const DlISize &size) override
 Called by the engine to fetch a VkImage for writing the next frame.
 
bool PresentImage (VkImage image, VkFormat format) override
 Called by the engine once a frame has been rendered to the image and it's ready to be bound for further reading/writing.
 
- Public Member Functions inherited from flutter::GPUSurfaceVulkanDelegate
virtual ~GPUSurfaceVulkanDelegate ()
 

Detailed Description

Definition at line 32 of file gpu_surface_vulkan_impeller_unittests.cc.

Constructor & Destructor Documentation

◆ TestGPUSurfaceVulkanDelegate()

flutter::testing::TestGPUSurfaceVulkanDelegate::TestGPUSurfaceVulkanDelegate ( )
inline

Definition at line 34 of file gpu_surface_vulkan_impeller_unittests.cc.

36 vkGetInstanceProcAddr)),
38 test_surface_(TestVulkanSurface::Create(*test_context_, {100, 100})) {}
static std::unique_ptr< TestVulkanSurface > Create(const TestVulkanContext &context, const DlISize &surface_size)
RefPtr< T > MakeRefCounted(Args &&... args)
Definition ref_ptr.h:253

Member Function Documentation

◆ AcquireImage()

FlutterVulkanImage flutter::testing::TestGPUSurfaceVulkanDelegate::AcquireImage ( const DlISize size)
inlineoverridevirtual

Called by the engine to fetch a VkImage for writing the next frame.

Implements flutter::GPUSurfaceVulkanDelegate.

Definition at line 42 of file gpu_surface_vulkan_impeller_unittests.cc.

42 {
43 return {
44 .struct_size = sizeof(FlutterVulkanImage),
45 .image = reinterpret_cast<uint64_t>(test_surface_->GetImage()),
46 .format = VK_FORMAT_R8G8B8A8_UNORM,
47 };
48 }
FlutterVulkanImage * image

References format, image, and FlutterVulkanImage::struct_size.

◆ PresentImage()

bool flutter::testing::TestGPUSurfaceVulkanDelegate::PresentImage ( VkImage  image,
VkFormat  format 
)
inlineoverridevirtual

Called by the engine once a frame has been rendered to the image and it's ready to be bound for further reading/writing.

Implements flutter::GPUSurfaceVulkanDelegate.

Definition at line 50 of file gpu_surface_vulkan_impeller_unittests.cc.

50{ return true; }

◆ vk()

const vulkan::VulkanProcTable & flutter::testing::TestGPUSurfaceVulkanDelegate::vk ( )
inlineoverridevirtual

Obtain a reference to the Vulkan implementation's proc table.

Implements flutter::GPUSurfaceVulkanDelegate.

Definition at line 40 of file gpu_surface_vulkan_impeller_unittests.cc.

40{ return *vk_; }

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