Skip to content

[Impeller] Consider specializing srcIn blending of texture and solid color. #121650

@jonahwilliams

Description

@jonahwilliams

srcIn blending with a solid color is frequent combination in Flutter applications:

The reason is that it lets you treat the input image as a mask, which is more or less what you want - and the other blend modes are really just a distrction.

  • In the framework, Its the default blend of images when a color is specified
  • Its the previous default and documented reasonable default for flutter_svg/vector_graphics
  • Its, as far as I can tell, the only reasonable value to choose for blending in drawAtlas, especially and used by particle grids

Right now we need to do the blending in a subpass. Even with optimizations I've done, the wonderous paint texture background is still a very significant chunk (~30%) of GPU utilization, and additional raster thread overhead for the subpass due to existing inefficiencies.

If we do this optimization we should document that it is the fastest combination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions