Flutter Engine

repository·main·Indexed 27 days ago

https://github.com/flutter-team-archive/engine

A portable runtime that hosts Flutter applications, implementing core libraries for animation, graphics, I/O, accessibility, and the Dart runtime. It includes the Impeller rendering runtime, featuring an offline shader compilation pipeline (GLSL 4.60), a backend-agnostic renderer, and support for Metal and Vulkan. The engine also contains the Flow Skia-based compositor and specialized libraries for geometry, images, and typography.

Tokens
57.5K
Snippets
132
Records
347
Agent score
93%

What's inside flutter-team-archive-engine

  1. Overview of `engine_build_configs` library

    main

    The engine_build_configs package provides Dart libraries for interacting with engine_v2 build configuration JSON files found in flutter/ci/builders.

    Key components include:

    • lib/src/build_config.dart: Provides Dart object representations of the build configuration JSON files.
    • lib/src/build_config_loader.dart: A helper class to load all build configuration JSON files within a directory tree into Dart objects.
    • lib/src/build_config_runner.dart: Classes designed to execute a loaded build configuration on a local machine.
  2. Overview of Const Finder

    main

    Const Finder is a utility program used to identify const creations of IconData classes within a Dart application. It utilizes package:kernel from the Dart SDK.

    The workflow is as follows:

    1. A snapshot is created using the build rules defined in BUILD.gn.
    2. The snapshot is vended to the Flutter tool.
    3. The Flutter tool uses the snapshot to find IconData constants.
    4. This information is passed to the font-subset tool to generate a minimized icon font file tailored to the specific application.
  3. Overview of the Windows Platform Embedder

    main

    The Windows Platform Embedder acts as the glue between the Flutter engine and the Windows operating system. Its primary responsibilities include:

    1. Launching the Flutter engine: Initializing the engine runtime.
    2. Providing a view: Creating the surface/window for the Flutter engine to render into.
    3. Dispatching events: Routing Windows platform events (like input or window messages) to the Flutter engine.
  4. Overview of the Impeller Base Library

    main
    The Impeller Base Library contains a collection of utility functions and components used within the Impeller graphics engine. These utilities are currently housed in the impeller/base directory because their usage is not yet extensive enough to justify moving them into the core buildroot library.
  5. Overview of the path_ops library

    main

    The path_ops library provides C bindings for Skia's SkPathOps, offering a minimal interface for SkPath. It is a subset of Skia's PathKit functionality and is primarily used by the vector_graphics optimizing compiler to optimize masking and clipping operations at compile time.

    Supported SkPath commands are limited to:

    • moveTo
    • lineTo
    • cubicTo
    • close
  6. Overview of Impeller Rendering Runtime

    main

    Impeller is a rendering runtime for Flutter designed for:

    • Predictable Performance: Performs all shader compilation and reflection offline at build time. Pipeline state objects are built upfront, and caching is explicitly controlled by the engine.
    • Instrumentability: All graphics resources (textures, buffers, pipeline state objects, etc.) are tagged and labeled. Animations can be captured and persisted to disk without impacting per-frame performance.
    • Portability: Shaders are authored once and converted to various backend-specific representations.
    • Modern API Utilization: Effectively uses features from modern APIs like Metal and Vulkan.
    • Concurrency: Capable of distributing single-frame workloads across multiple threads.