Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Under the Hood : Flutter Engine

Hüseyin Hamad
December 13, 2024
3

Under the Hood : Flutter Engine

Hüseyin Hamad

December 13, 2024
Tweet

Transcript

  1. Flutter, a framework developed by Google. 5 Cross-Platform UI Framework

    Large Community Open Source Beautiful Developer Experience
  2. Flutter, a framework developed by Google. 6 Cross-Platform UI Framework

    Large Community Open Source Beautiful Developer Experience Has 3 layers Flutter SDK Flutter Engine Platform - Specific Embedders
  3. Flutter SDK 10 Written in Dart Open Source Modern react-style

    framework Rich set of widgets implementing Material and Cupertino Design styles
  4. Flutter SDK 11 Written in Dart Open Source Modern react-style

    framework Rich set of widgets implementing Material and Cupertino Design styles But how?
  5. Dart Code Widget Tree Layout Phase Painting Phase Compositing Phase

    Rasterizing Phase Flutter SDK is an UI toolkit How does Flutter SDK work? 14 Composes of Widgets
  6. 15 Phase Where Description Layout Flutter SDK Determines exactly how

    big each object is, and where it will be displayed on the screen Phases, The Motion of Our Lives
  7. 16 Phase Where Description Layout Flutter SDK Determines exactly how

    big each object is, and where it will be displayed on the screen Phases, The Motion of Our Lives Painting Flutter SDK Provides each widget with a canvas, and tells it to paint itself on it
  8. 17 Phase Where Description Layout Flutter SDK Determines exactly how

    big each object is, and where it will be displayed on the screen Phases, The Motion of Our Lives Painting Flutter SDK Provides each widget with a canvas, and tells it to paint itself on it Compositing Flutter Engine Puts everything together into a scene, and sends it to the GPU for processing
  9. 18 Phase Where Description Layout Flutter SDK Determines exactly how

    big each object is, and where it will be displayed on the screen Phases, The Motion of Our Lives Painting Flutter SDK Provides each widget with a canvas, and tells it to paint itself on it Compositing Flutter Engine Puts everything together into a scene, and sends it to the GPU for processing Rasterizing Flutter Engine The scene is displayed on the screen as a matrix of pixels
  10. 20 Flutter Engine Responsible for rasterizing composited scenes whenever a

    new frame needs to be painted. Its’a low-level implementation of Flutter's core API
  11. 21 Flutter Engine Responsible for rasterizing composited scenes whenever a

    new frame needs to be painted. Its’a low-level implementation of Flutter's core API Includes Graphics Text-Layout File and Network I/O Dart Runtime / Compile Toolchain
  12. 22 Flutter Engine In Depth Reliable rendering across platforms Skia

    handling traditional 2D graphics Impeller optimizing modern GPU pipelines. Skia - Impeller
  13. Reliable rendering across platforms Skia handling traditional 2D graphics Impeller

    optimizing modern GPU pipelines. Facilitate communication between Flutter and native code (iOS/Android). Allow Dart to interact with platform- specific services like camera, sensors, or notifications. Use MethodChannel, BasicMessageChannel, or EventChannel to enable seamless data exchange. Skia - Impeller Platform Channels 23 Flutter Engine In Depth
  14. Reliable rendering across platforms Skia handling traditional 2D graphics Impeller

    optimizing modern GPU pipelines. Facilitate communication between Flutter and native code (iOS/Android). Allow Dart to interact with platform- specific services like camera, sensors, or notifications. Use MethodChannel, BasicMessageChannel, or EventChannel to enable seamless data exchange. Skia - Impeller Platform Channels Flutter Engine In Depth Integral part of the Flutter Engine Handles Dart code execution, garbage collection, and asynchronous operations Dart Runtime 24
  15. 28 Flutter In Numbers Open Issues Closed Issues 2014 2015

    2016 2017 2018 2019 2020 2021 2022 2023 2024 0 5000 10000 15000 20000
  16. 29 Commits 2014 2015 2016 2017 2018 2019 2020 2021

    2022 2023 2024 0 1000 2000 3000 4000 5000 6000 Flutter In Numbers
  17. 30 Challenges and Disadvantages Increased Maintenance Effort Risk of Divergence

    Compatibility Issues Reduced Community Support Difficulty in Upgrading Security Risks Performance Concerns