Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Impeller] Support external (surface) textures in Vulkan #137639

Closed
@matanlurey

Description

@matanlurey

Note

This is a quasi-placeholder issue, as I only learned what a "Surface Texture" is ~5 minutes ago, so part of the resolution will be updating this issue with actual useful information. Thanks for your patience 😄


An Android SurfaceTexture is a combination of a surface and an OpenGL ES (GLES) texture 1.

For example, this would be used to display frames from a camera plugin:

On newer devices (or is it APIs? I'm not sure), Android provides a backend-agnostic hardware buffer that can be used (directly) by Vulkan but on older devices we'll receive an OpenGL-backed surface texture, and need to adapt it for use within Vulkan - that will involve creating a new OpenGL context, and some interop.

Some possible references:

As an initial look, I'll try package:camera in an Impeller+Vulkan demo. It might also be worth looking into Skia's codebase to see how they handle this.

/cc @jonahwilliams @johnmccutchan (feel free to edit this description if inaccurate!)

Footnotes

  1. https://source.android.com/docs/core/graphics/arch-st

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: parityWorks on one platform but not anothere: impellerImpeller rendering backend issues and features requestsengineflutter/engine repository. See also e: labels.fyi-androidFor the attention of Android platform teamteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions