Impeller is Flutter's new rendering engine
published on 2022/09/05
Impeller is a rendering runtime for Flutter with the following objectives:
- Predictable Performance: All shader compilation and reflection is performed offline at build time. All pipeline state objects are built upfront. Caching is explicit and under the control of the engine.
- Instrumentable: All graphics resources (textures, buffers, pipeline state objects, etc..) are tagged and labeled. Animations can be captured and persisted to disk without affecting per-frame rendering performance.
- Portable: Not tied to a specific client rendering API. Shaders are authored once and converted as necessary.
- Uses Modern Graphics APIs Effectively: Makes heavy use of (but doesn’t depend on) features available in Modern APIs like Metal and Vulkan.
- Makes Effective Use of Concurrency: Can distribute single-frame workloads across multiple threads if necessary.
It is still in preview stage but it is interesting to learn that they are moving away from Skia.
Does Impeller use Skia for rendering?
- No. Impeller has no direct dependencies on Skia.
- When running with Impeller, Flutter does not create a Skia graphics context.
- However, while Impeller still performs text rendering, text layout and shaping needs to be done by a separate component. This component happens to be SkParagraph which is part of Skia.
- Similarly, Impeller does not perform image decompression. Flutter uses a standard set of codecs wrapped by Skia before querying the system supplied image formats.
- So, while Impeller does not use nor is it a wrapper for Skia, some Skia components are still used by Flutter when rendering using Impeller.