[Buildroot] [PATCH 3/5] package/flutter-engine: use impeller rendering engine

Adam Duskett adam.duskett at amarulasolutions.com
Thu Oct 19 07:46:13 UTC 2023


From: https://docs.flutter.dev/perf/impeller
Impeller provides a new rendering runtime for Flutter. The Flutter team’s
believes this solves Flutter’s early-onset jank issue. Impeller precompiles a
smaller, simpler set of shaders at Engine build time so they don’t compile at
runtime.

Impeller has the following objectives:

  - Predictable performance: Impeller compiles all shaders and reflection
    offline at build time. It builds all pipeline state objects upfront.
    The engine controls caching and caches explicitly.

  - Instrumentable: Impeller tags and labels all graphics resources like
    textures, and buffers. It can capture and persist animations to disk
    without affecting per-frame rendering performance.

  - Portable: Flutter doesn’t tie Impeller to a specific client rendering API.
    You can author shaders once and convert them to backend-specific formats as
    necessary.

  - Leverages modern graphics APIs: Impeller uses, but doesn’t depend on,
    features available in modern APIs like Metal and Vulkan.

  - Leverages concurrency: Impeller can distribute single-frame workloads
    across multiple threads if necessary.

Signed-off-by: Adam Duskett <adam.duskett at amarulasolutions.com>
---
 package/flutter-engine/flutter-engine.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk
index dba9f71c4d..4eb8487d40 100644
--- a/package/flutter-engine/flutter-engine.mk
+++ b/package/flutter-engine/flutter-engine.mk
@@ -124,6 +124,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
 FLUTTER_ENGINE_DEPENDENCIES += libgles
+FLUTTER_ENGINE_CONF_OPTS += --enable-impeller-opengles
 endif
 
 ifeq ($(BR2_PACKAGE_LIBGLFW),y)
@@ -142,7 +143,7 @@ endif
 
 # There is no --disable-vulkan option
 ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),y)
-FLUTTER_ENGINE_CONF_OPTS += --enable-vulkan
+FLUTTER_ENGINE_CONF_OPTS += --enable-vulkan --enable-impeller-vulkan
 endif
 
 ifeq ($(BR2_PACKAGE_XORG7)$(BR2_PACKAGE_LIBXCB),yy)
-- 
2.41.0




More information about the buildroot mailing list