mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixes https://github.com/flutter/flutter/issues/165959 Flame uses a lot of individual calls to drawImageRect w/ blend color filters to color the sprites. This is much slower with Impeller today, because we convert this into: ``` saveLayer(color filter) drawImageRect restore ``` Instead, we can detect this case and convert to a call to drawAtlas. drawAtlas will use the porter-duff shader which removes the saveLayer entirely. We could do this optimization while recording, but for now its fine to do in dispatch. We do have a snapshot optimization that catches "normal" image usage, but it doesn't apply in the flame case as the source rects are sampling from a larger texture and we don't have a way to pass those through the snapshot system. ## Before <img src="https://github.com/user-attachments/assets/faada042-843f-4f15-af20-9baf862f66fd" width="200"/> ## After <img src="https://github.com/user-attachments/assets/c83e061c-190f-4613-a725-88e16b776c04" width="200"/> --------- Co-authored-by: gaaclarke <30870216+gaaclarke@users.noreply.github.com>
Flutter Engine
Setting up the Engine development environment
See here
gclient bootstrap
Flutter engine uses gclient to manage dependencies.
If you've already cloned the flutter repository: