Skip to content

Texture need support gpu buffer data in common API #83693

@xiaowei-guan

Description

@xiaowei-guan

Use case

As a developer of other platforms, we use the common API(shell/platform/common) to develop plugins . In the common API, I found that txture only supports pixel buffer data.As we know, there are performance problems when using pixel buffer data because it copies data from CPU to GPU.

Proposal

When using Texture, we need Common API to support GPU buffer Data:
1.we can add a new struct for gpu buffer data.

typedef struct {
 // The gpu data buffer.
 const void* buffer;
 // Width of the gpu buffer.
 size_t width;
 // Height of the gpu buffer.
 size_t height;
} FlutterDesktopGpuBuffer;

2.we can add a new callback to obtain gpu buffer data pointer when tiggle gl_external_texture_frame_callback.
3.Add a destruction callback when GPU render finished.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttere: embedderUsers of the Embedder APIengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions