Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit fb80e86

Browse files
authored
[Impeller] Add FAQ entry clarifying Skia usage and Web support. (#34076)
1 parent 72abd01 commit fb80e86

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

impeller/docs/faq.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,40 @@
1010
`./flutter/tools/gn`. Only do this if you frequently work with Playgrounds
1111
and don't want to have to set the flags manually. Also, it would be a bad
1212
idea to set this environment variable on CI.
13+
* Does Impeller use Skia for rendering?
14+
* No. Impeller has no direct dependencies on Skia.
15+
* When running with Impeller, Flutter does not create a Skia graphics context.
16+
* However, while Impeller still performs text rendering, text layout and
17+
shaping needs to be done by a separate component. This component happens to
18+
the SkParagraph which is part of Skia.
19+
* Similarly, Impeller does not perform image decompression. Flutter uses a
20+
standard set of codecs wrapped by Skia before querying the system supplied
21+
image formats.
22+
* So, while Impeller does not use nor is it a wrapper for Skia, some Skia
23+
components are still used by Flutter when rendering using Impeller.
24+
* Is Impeller going to be supported on the Web?
25+
* The current priority for Impeller is to be amazing on all platforms targeted
26+
by the C++ engine. This includes iOS, Android, desktops, and, all Embedder
27+
API users. This would be by building Metal, Open GL, Open GL ES, and, Vulkan
28+
rendering backends.
29+
* The Open GL ES backend ought to work fine to target WebGL/WebGL2 and the
30+
team can fix any issues found in such uses of the backend.
31+
* However, in Flutter, Impeller sits behind the Display List interface in the
32+
C++ engine. Display lists apply optimizations to the Flutter rendering
33+
intent. But, more importantly for Impeller, they also provide a generic
34+
interface with the ability to specify "dispatchers" to different rendering
35+
packages. Today, the engine has Skia and Impeller dispatchers for display
36+
lists.
37+
* The web engine is unique in that it doesn't use any C++ engine components.
38+
This includes the display lists mechanism. Instead, it interfaces directly
39+
with Skia via the CanvasKit package.
40+
* Updating the web engine to interface directly with Impeller is a non-goal at
41+
this time. It is a significant undertaking (compared to a flag to swap
42+
dispatchers that already exists) and also bypasses display list
43+
optimizations.
44+
* For this added implementation complexity, Web support has not been a
45+
priority at this time for the small team working on Impeller.
46+
* We are aware that these priorities might change in the future. There have
47+
been sanity checks to ensure that the Impeller API can be ported to WASM and
48+
also that Impeller shaders can be [compiled to WGSL](https://github.com/chinmaygarde/wgsl_sandbox)
49+
for eventual WebGPU support.

0 commit comments

Comments
 (0)