Although the same session component could also implement the Graphical Presenter
roll, there is a FIDL protocol,
that allows a session component to delegate Graphical Presenter
responsibilities another component. This makes it possible for each component to
execute in different runtimes (such Rust versus Flutter/Dart) if needed.
Displaying element views
For Fuchsia-based products running on devices with a graphical display, a session implementation manages displayable components through the Element API. Each element renders its graphical representation in what is known as a "view".
A session will request the Element's view, and then pass that view to the Graphical Presenter to be displayed, along with optional [Element Annotations][element-annotations], used to communicate product-specific presentation properties.
The session calls the
PresentView() to display a
PresentView() takes a
ViewSpec, through which the session
conveys where and how it wants the view to be displayed in the
graph. In return, the caller is given a handle to the view, as a
ViewController. The caller can request changes to the view via calls to the
ViewController, or destroy the view (remove it from the display) by releasing
or closing its
The developer guide includes an example implementation of presenting an element's view.