-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Flutter 3.19 iOS impeller optimization for BackdropFilter #360
Comments
Hi @mikeesouth, thanks for the detailed report! This does seem like a Flutter/Impeller issue and will need to be reported to the Flutter team. Especially if it used to work on 3.16 Would you be willing to make a new issue on the Flutter repo, and link to this one? |
@HayesGordon thanks! |
Great! I see they have already been able to repro edit: spelling |
The Flutter issue has been closed, and 3.19.4 seems to include this fix. Can you verify it works again as expected? |
Sorry for the late response but yes - this works as expected now in 3.22.1 (latest stable). I didn't have time to test in 3.19.4 but I assume that it works there too. Thanks for handling this swiftly! |
Description
Flutter 3.19 introduced new optimizations for BackdropFilter when using Impeller (currently only on iOS). This new optimization does not work correctly for Rive assets with two (or more) clipping masks that affect the same element. This is the result of my detective work but I assume that there is a better and more logical explanation to why this happens :) I have this issue with one of my main Rive assets so that's why I started to debug and found that removing the secondary clipping mask solved the issue.
Ok, so a BackdropFilter can blur the background and maybe also dim the backgrounds content with 50% opacity black color or so. It's commonly used with modals. When having a Rive asset in the background, the expected result is for that Rive asset to also blurred and dimmed - even if it's animated. This works correctly in Flutter 3.16 for all files that I've tested. In Flutter 3.19, it works for all files except if the Rive artboard contains two (or more) clipping masks - then that Rive asset is displayed without blur and without dim from the backdrop color - it is just as if the Rive animation was drawn on top of the BackdropFilter instead of under it. I also tested with Flutter 3.19.1 and it has the same issue.
Steps To Reproduce
Here is a repo that reproduces the error: https://github.com/mikeesouth/rive_mask_backdrop_bug
Steps to reproduce the behavior:
Source
.riv
/.rev
fileI've attached two files:
rive-test-files.zip
Expected behavior
I expect the Rive asset to be blurred and dimmed by the BackDropfilter, even if the file contains two or more clipping masks.
Screenshots
First a screenshot of how it looks, note that the third image in the top isn't blurred or dimmed.

Here is a very simple screenshot from the Rive editor describing how I created the second mask. The issue occurs if the masks is set on the same entity or in nested entities (in this screenshot, the second mask is created deeper in the structure than the first mask).

Device & Versions (please complete the following information)
Additional context
I'm not sure if this is a problem with
rive-flutter
or with the new optimization in Flutter 3.19. Maybe I should post this issue on the flutter github too? I haven't looked too much into the details of these optimizations but I guess that flutter/engine#47808 and flutter/engine#47397 are related.This bug can be tested in this repo: https://github.com/mikeesouth/rive_mask_backdrop_bug
The text was updated successfully, but these errors were encountered: