Previously codec.cc needed all required frames to already be decoded before it could decode any of their dependent frames. To accomplish this it would always cache required frames, regardless of cache limit. However both GIF and WEBP (the only currently supported animated image formats) only allow the image to depend on one decoded frame at a time. This means that there's no reason to cache all the required frames since it's only valid for the image formats to require one previously decoded frame at a time. (For example, frame 10 and frame 11 in a hypothetical animated image could all depend on frame 9. But no subsequent frame after frame 9 could depend on frames 0-8.) Frames are always added to the cache as long as they're under the limit, and never removed. Required frames are always stored as a separate member on `MultiFrameCodec`. Warning: this logic will break if we decide to support more animated formats in the future. Fixes flutter/flutter#24835.
Flutter Engine
Flutter is a new way to build high-performance, cross-platform mobile apps. Flutter is optimized for today's, and tomorrow's, mobile devices. We are focused on low-latency input and high frame rates on Android and iOS.
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 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.io. For specific information about Flutter's APIs, consider our API reference which can be found at the docs.flutter.io.
If you intend to contribute to Flutter, welcome! You are encouraged to start with our contributor guide, which helps onboard new team members.