[Impeller] add mechanism for sharing bdf inputs. (#55701) Introduces a mechanism to allow backdrop filters to 1) share backdrop inputs and 2) fuse filter applications for faster blurs. This is a proposed solution to https://github.com/flutter/flutter/issues/131568 Implemented: * Developer can specify a "backdrop id" which indicates that a backdrop layer should share the input texture and potentially cached filter for a layer. * Removes second save layer for each backdrop filter * Removes save layer trace event for backdrop filter * Can fuse backdrop filters if there is more than one identical filter TBD: * Adjust heruristic to avoid applying bdf filter to entire screen Suggestions: applying a bdf should be a distinct operation from a save layer in the DL builder/dispatcher. The saveLayer implmenentation in the impeller dispatcher is super convoluted because it needs to handle both. ### Video Video starts with normal bdf then I hot reload to specify that the bdfs share inputs/filters. This is running on a pixel 8 pro Change to the macrobenchmark app is just: ```dart Widget build(BuildContext context) { Widget addBlur(Widget child, bool shouldBlur) { if (shouldBlur) { return ClipRect( child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), backdropId: 1, // Added ID child: child, ), ); } else { return child; } } ``` https://github.com/user-attachments/assets/22707f97-5825-43f1-91b4-1a02a43437f5 Requires framework changes in https://github.com/jonahwilliams/flutter/pull/new/backdrop_id
Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.
If you want to run/contribute to Flutter Web engine, more tooling can be found at felt. This is a tool written to make web engine development experience easy.
If you are new to Flutter, then you will find more general information on the Flutter project, including tutorials and samples, on our Web site at Flutter.dev. For specific information about Flutter's APIs, consider our API reference which can be found at the docs.flutter.dev.
Flutter is a fully open source project, and we welcome contributions. Information on how to get started can be found at our contributor guide.