All memory that is allocated for graphics surfaces on Fuchsia must come from sysmem.
Normally, software rendering in the Flutter embedder uses a surface that Flutter allocates itself using Skia. We don't want this default behavior because we need our surface to come from sysmem. As a result we provide our own callback for allocating software surfaces to the embedder (see FuchsiaAcquireSoftwareSurface
).
SoftwareSurface
is where we interact with sysmem to get the buffer for software rendering. We then register this buffer with Flatland, getting a token that we can use to turn this buffer into a Flatland image.
The lifecycle currently goes: