Skip to content

[Impeller] Empty subpasses should not be elided when they have "destructive" color filters #137090

@gaaclarke

Description

@gaaclarke

Spawn from: #126391

Currently, if a SaveLayer contains no Entities, we always skip rendering it because it has no coverage. However, this is incorrect in cases where the entire subpass will be modified with destructive color filters. The subpass also needs to expand to fille the whole clip (#126389).

@bdero 's stated fix for the issue:

We happened to solve the destructive blend mode case at some point after this bug was made.

One case we're definitely not handling yet is destructive color filters. For this I'd recommend adding a way to detect this on the Aiks ColorFilter abstraction. Something like:

Move Entity::IsBlendModeDestructive to live in color.cc instead. We've already moved pretty much all the other blend stuff there.
Add a virtual IsDestructive() to ColorFilter, ColorFilter impl just returns false.
In the ColorFilterMatrix override, return true of the set color matrix would result in anything other than the destination color returning when the source color is fully transparent.
For the BlendColorFilter override, same deal if the set blend mode is destructive.
Add an bool IsColorFilterDestructive() to the pass delegate that returns true if the paint's ColorFilter is destructive.
Adjust our logic for expanding the subpass coverage here to account for destructive color filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: 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