Skip to content

[Impeller] Use ASurfaceControl/ASurfaceTransaction/AHardwareBuffer instead of a Vulkan API based swapchain on Android #143105

@dnfield

Description

@dnfield

We should be able to create an ASurfaceControl from the ANativeWindow, and use that ASurfaceControl to create one or more ASurfaceTransactions that set an AHardwareBuffer to them (using ASurfaceTransaction_setBuffer).

This should replace the current swapchain implementation on Vulkan - we'd have to wrap the AHardwareBuffers into whatever Vulkan objects (I assume a VkImage?) that get used by the rest of Impeller.

This gives us a few more knobs that aren't available in the straight Vulkan APIs:

In theory it could help as well since we'll be talking directly to surfaceflinger with this API rather than going through whatever the Vulkan driver is doing. These APIs are all 29+, but we're already restricting Vulkan on Impeller to 29+ anyway.

This last part is what I think will give us better integration with Android native tracing capabilities.

@johnmccutchan @jonahwilliams @chinmaygarde fyi

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.fyi-androidFor the attention of Android platform teamteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions