Skip to content

[Impeller] Add BlitPass::AddCopy overload for copying Texture contents to the host. #135783

@bdero

Description

@bdero

Right now BlitPass::AddCopy has a routine to copy data from a Texture to a DeviceBuffer, but it also unnecessarily copies data to the host when doing so. What's worse is that we're actually relying on this host copying behavior for Texture->DeviceBuffer blits.

Instead, there should be a BlitPass::AddCopy overload that only copes data to CPU resident memory, and another one that only copies data to device resident memory.

  bool AddCopy(std::shared_ptr<Texture> source,
               fml::Mapping& destination, // out param
               std::optional<IRect> source_region = std::nullopt,
               IPoint destination_origin = {},
               std::string label = "");

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilitye: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-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