Skip to content

Document Headless mode Rendering setup #81868

@creativecreatorormaybenot

Description

Current docs

Going through the wiki on Flutter's modes, you will find a mention of headless mode:

Headless test mode on desktop: Same as debug mode except headless and for desktop platforms. Used by flutter test. Built with sky/tools/gn.

This is also mentioned in the docs.
From what I can tell, this is generally lacking documentation, but I think we can deduce from this that headless mode can only be accessed using flutter test.

Debug/Release/Profile Rendering setup

flutter help run will spit out the following information:

    --enable-software-rendering                   Enable rendering using the
                                                  Skia software backend. This is
                                                  useful when testing Flutter on
                                                  emulators. By default, Flutter
                                                  will attempt to either use
                                                  OpenGL or Vulkan and fall back
                                                  to software when neither is
                                                  available.
    --skia-deterministic-rendering                When combined with
                                                  "--enable-software-rendering",
                                                  this should provide completely
                                                  deterministic (i.e.
                                                  reproducible) Skia rendering.
                                                  This is useful for testing
                                                  purposes (e.g. when comparing
                                                  screenshots).

This suggests that there are three rendering modes in Flutter:

  1. Non-deterministic GPU rendering (using OpenGL or Vulkan).
  2. Non-deterministic software rendering
  3. Deterministic software rendering

What is missing?

Which of these three modes is flutter test using?

This is important to know when working with the headless mode to either write Goldens tests or make use of this headless mode for other purposes (exporting animations e.g.).
Therefore, this should be documented.


Note that flutter test does not accept any of the rendering flags mentioned above. It would also be good to have documented why that is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectd: wikiFlutter or engine wikisteam-engineOwned by Engine teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy