-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
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.