-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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:
- Non-deterministic GPU rendering (using OpenGL or Vulkan).
- Non-deterministic software rendering
- 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.