Skip to content

Framebuffer API #174

@olanod

Description

@olanod

What do you think of my comment in #171 (comment). Feasible? Not expert in the subject so I might not see lots of small details.

...
I'd like to see a frame buffer API some time, for embedded contexts for example a buffer that I fill with some pixel information(e.g. a micro writing B&W pixels of a small e-ink display) is all that would be needed I guess. The frame buffer can be a wasi file descriptor, perhaps the user can request/create more than one buffer or is given one by the host, then with existing APIs something like window resizing could be detected by listening to events on the file descriptor, a __WASI_EVENTTYPE_FD_READ could signal that the buffer changed(window resized?) a __WASI_EVENTTYPE_FD_WRITE could be the requestAnimationFrame of WASI world.
Once the user renders pixels on the buffer by hand or with a graphics API like webGPU then the host decides what to do with that, could be a headless set up where the frame-buffer is dumped to a file or telling the compositor of the platform hey here are some pixels!, put it in the window you gave me!(window was created by the run-time host, not the user?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions