Skip to content
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

[canvaskit] Fix backdrop filter with platform views as children #51442

Conversation

harryterkelsen
Copy link
Contributor

@harryterkelsen harryterkelsen commented Mar 15, 2024

There is a bug in CanvasKit where a backdrop filter with a platform view as a child will cause the backdrop filter to apply multiple times. This change fixes it by only applying the backdrop filter once.

The bug case is more likely to happen since #47317 landed because when we encounter an invisible platform view, we always create a new SkPicture instead of continuing to use the same SkPicture.

BEFORE:
canvaskit_backdropfilter_with_platformview_BAD

AFTER:
canvaskit_backdropfilter_with_platformview

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Mar 15, 2024
Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #51442 at sha 738902c

@harryterkelsen harryterkelsen merged commit c2fd533 into flutter:main Mar 15, 2024
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 15, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 15, 2024
…145226)

flutter/engine@d107f65...c2fd533

2024-03-15 [email protected] [canvaskit] Fix backdrop filter with platform views as children (flutter/engine#51442)
2024-03-15 [email protected] Roll Skia from 54ecc23acf31 to 11b1a958c2ac (1 revision) (flutter/engine#51440)
2024-03-15 [email protected] [DisplayList] Pre-Compute saveLayer bounds in DLBuilder (flutter/engine#50935)
2024-03-15 [email protected] Roll Fuchsia Linux SDK from da-siZ7wPDA0Z0wXJ... to nTth7xxzAfENAJjMH... (flutter/engine#51446)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from da-siZ7wPDA0 to nTth7xxzAfEN

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-web Code specifically for the web engine will affect goldens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants