Project: /_project.yaml Book: /_book.yaml

fuchsia.ui.gfx

PROTOCOLS

SnapshotCallbackDEPRECATED {:#SnapshotCallbackDEPRECATED}

Defined in fuchsia.ui.gfx/commands.fidl

OnData {:#OnData}

Request

PoseBufferProvider {:#PoseBufferProvider}

Defined in fuchsia.ui.gfx/pose_buffer_provider.fidl

A minimal fidl interface to allow sourcing the contents of a PoseBuffer from another service.

SetPoseBuffer {:#SetPoseBuffer}

Sets the PoseBuffer and the parameters PoseBufferProvider will use to fill that PoseBuffer. Setting this when it is already set will replace the previously set parameters with the new parameters, which will release the provider's reference to the buffer.

Request

SnapshotCallbackDEPRECATED {:#SnapshotCallbackDEPRECATED}

Defined in fuchsia.ui.gfx/commands.fidl

OnData {:#OnData}

Request

PoseBufferProvider {:#PoseBufferProvider}

Defined in fuchsia.ui.gfx/pose_buffer_provider.fidl

A minimal fidl interface to allow sourcing the contents of a PoseBuffer from another service.

SetPoseBuffer {:#SetPoseBuffer}

Sets the PoseBuffer and the parameters PoseBufferProvider will use to fill that PoseBuffer. Setting this when it is already set will replace the previously set parameters with the new parameters, which will release the provider's reference to the buffer.

Request

STRUCTS

CreateResourceCmd {:#CreateResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Instructs the compositor to create the specified Resource, and to register it in a table so that it can be referenced by subsequent commands.

ReleaseResourceCmd {:#ReleaseResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Releases the client's reference to the resource; it is then illegal to use the ID in subsequent Commands. Other references to the resource may exist, so releasing the resource does not result in its immediate destruction; it is only destroyed once the last reference is released. For example, the resource may be required to render an in-progress frame, or it may be referred to by another resource). However, the ID will be immediately unregistered, and may be reused to create a new resource.

ExportResourceCmd {:#ExportResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Create an external reference to the specified resource, which can then be imported into another Session by passing a handle to token's peer to ImportResourceCmd; see that comment for more details.

The importing client is typically in a different process than the exporter. No specific mechanism is provided for transferring a token from an exporter to an importer; collaborators may choose any out-of-band API they wish to do so.

ImportResourceCmd {:#ImportResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Import a resource that was exported via ExportResourceCmd(). token is a handle to the eventpair peer that was used to export the resource, and spec describes the type of the imported resource, and the commands which can legally be applied to it. Afterward, id can be used to refer to the resource in an Command, similarly (but not identically: see below) to a resource that was created in the session. For example, you can add children to an imported EntityNode via AddChildCmd.

However, note that the importer does not gain full access to the imported resource, but rather to an attenuated subset of its capabilities. For example, you cannot use a DetachCmd to detach an imported EntityNode from its parent.

Unlike ExportResourceCmd, there is no configurable timeout. There is an expectation that the exported resource will become available in a short amount of time. TODO: this needs elaboration... e.g. we might notify via the SessionListener when we know that the link will never be made (e.g. if the peer of the import token is destroyed).

SetTagCmd {:#SetTagCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's tag value.

A session can apply a tag value to any node to which it has access, including imported nodes. These tags are private to the session and cannot be read or modified by other sessions. When multiple sessions import the same node, each session will only observe its own tag values.

Hit test results for a session only include nodes which the session has tagged with a non-zero value. Therefore a session can use tag values to associate nodes with their functional purpose when picked.

Constraints:

  • node_id refs a Node.
  • tag_value is the tag value to assign, or 0 to remove the tag.

DetachCmd {:#DetachCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detaches a parentable object from its parent (e.g. a node from a parent node, or a layer from a layer stack). It is illegal to apply this command to a non-parentable object. No-op if the target object currently has no parent.

Constraints:

  • id refs a parentable object

Discussion: For nodes, this command will detach a node from its parent, regardless of whether it is a part or a child of its parent.

SetTranslationCmd {:#SetTranslationCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) translation.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetScaleCmd {:#SetScaleCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) scale.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetRotationCmd {:#SetRotationCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) rotation.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetAnchorCmd {:#SetAnchorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) anchor point.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetSizeCmd {:#SetSizeCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets an object's size.

Constraints:

  • id refs a resizeable object.
  • some objects that support this command may have additional constraints (e.g. in some cases depth must be zero).

SetOpacityCmd {:#SetOpacityCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's opacity.

Constraints:

  • node_id refs a Node with the has_opacity characteristic.
  • opacity is in the range [0, 1].

SendSizeChangeHintCmdHACK {:#SendSizeChangeHintCmdHACK}

Defined in fuchsia.ui.gfx/commands.fidl

Sends a hint about a pending size change to the given node and all nodes below. This is generally sent before an animation.

width_change_factor and height_change_factor is how much bigger or smaller the item is expected to be in the near future. This one number encapsulate both changes in scale, as well as changes to layout width and height.

AddChildCmd {:#AddChildCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Add a node as a child to another node.

Constraints:

  • id refs a Node with the has_children characteristic.
  • child_id refs any Node.

Discussion: The child node is first removed from its existing parent, as if DetachCmd was applied first.

AddPartCmd {:#AddPartCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Add a node as a part of another node. The implications of being a part rather than a child differ based on the type of the part. However, one implication is constant: removing all of a node's children (e.g. via DetachChildrenCmd) does not affect its parts. This is similar to the “shadow DOM” in a web browser: the controls of a element are implemented as using the shadow DOM, and do no show up amongst the children of that element.

Constraints:

  • id refs a Node with the has_parts characteristic.
  • part_id refs any Node.

Discussion: The part node is first removed from its existing parent, as if DetachCmd was applied first.

DetachChildrenCmd {:#DetachChildrenCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detaches all of a node's children (but not its parts).

SetShapeCmd {:#SetShapeCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's shape.

Constraints:

  • node_id refs a Node with the has_shape characteristic.
  • shape_id refs a Shape, or nothing.
  • if this command causes the target to have both a Shape and a Material, then these must be compatible with each other (see README.md regarding “Shape/Material Compatibility”).

Discussion: In order to be painted, a node requires both a Shape and a Material. Without a material, a node can still participate in hit-testing and clipping. Without a shape, a node cannot do any of the above.

SetMaterialCmd {:#SetMaterialCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's material.

Constraints:

  • node_id refs a Node with the has_material characteristic.
  • material_id refs a Material, or nothing.
  • if this command causes the target to have both a Shape and a Material, then these must be compatible with each other (see README.md regarding “Shape/Material Compatibility”).

Discussion: In order to be painted, a node requires both a Shape and a Material. Without a material, a node can still participate in hit-testing and clipping. Without a shape, a node cannot do any of the above.

SetClipCmd {:#SetClipCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's clip. DEPRECATED: use SetClipPlanesCmd.

Constraints:

  • node_id refs a Node with the has_clip characteristic.
  • clip_id a Node with the is_clip characteristic, or nothing. If the referenced node is not rooted, then it will have no effect (since its full world-transform cannot be determined).
  • clip_to_self If false, children are only clipped to the region specified by clip_id. If true, children are additionally clipped to the node's shape (as determined by its ShapeNode parts).

Discussion: If a node has a clip, it will be applied to both the parts and the children of the node. Under some circumstances (TBD), a clip will not be applicable to a node; in such cases it will be as though no clip has been specified for the node.

SetHitTestBehaviorCmd {:#SetHitTestBehaviorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's hit test behavior.

Discussion: By default, hit testing is performed on the node's content, its parts, and its children.

SetViewPropertiesCmd {:#SetViewPropertiesCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the properties for a ViewHolder's attached View.

Constraints:

  • view_holder_id refs a ViewHolder.

TakeSnapshotCmdDEPRECATED {:#TakeSnapshotCmdDEPRECATED}

Defined in fuchsia.ui.gfx/commands.fidl

SetCameraCmd {:#SetCameraCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a renderer's camera.

Constraints:

  • renderer_id refs a Renderer.
  • camera_id refs a Camera, or stops rendering by passing zero.
  • matrix is a value or variable of type kMatrix4x4.

SetCameraTransformCmd {:#SetCameraTransformCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's view matrix. This operation can be applied to both Cameras and StereoCameras.

Constraints:

  • camera_id refs a Camera.
  • eye_position is the position of the eye.
  • eye_look_at is the point is the scene the that eye is pointed at.
  • eye_up defines the camera's “up” vector.

SetCameraProjectionCmd {:#SetCameraProjectionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's projection matrix. This operation cannot be applied to a StereoCamera.

Constraints:

  • camera_id refs a Camera that is not a StereoCamera.
  • fovy is the Y-axis field of view, in radians.

NOTE: A default orthographic projection is specified by setting fovy to zero. In this case, the camera transform is ignored.

SetStereoCameraProjectionCmd {:#SetStereoCameraProjectionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a StereoCamera's projection matrices. This operation can only be applied to a StereoCamera.

Constraints:

  • camera_id refs a StereoCamera.
  • left_projection is the projection matrix for the left eye.
  • right_projection is the projection matrix for the right eye.

These projection matrices may also contain a transform in camera space for their eye if needed.

SetCameraClipSpaceTransformCmd {:#SetCameraClipSpaceTransformCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's clip-space transform.

Constraints:

  • camera_id refs a Camera.
  • translation is the desired translation, in Vulkan NDC.
  • scale is the scale factor to apply before translation.

SetCameraPoseBufferCmd {:#SetCameraPoseBufferCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the “pose buffer” for the camera identified by camera_id. This operation can be applied to both Cameras and StereoCameras.

This will override any position and rotation set for the camera and will make it take its position and rotation from the pose buffer each frame based on the presentation time for that frame.

A pose buffer represents a ring buffer of poses for a fixed number of time points in the future. Each entry in the buffer identified by buffer_id is a quaternion and a position layed out as follows:

struct Pose { // Quaternion float32 a; float32 b; float32 c; float32 d;

// Position float32 x; float32 y; float32 z;

// Reserved/Padding byte[4] reserved; }

The buffer can be thought of as a packed array of num_entries Pose structs and is required to be at least num_entries * sizeof(Pose) bytes.

The quaternions and positions are specified in the space of the camera's parent node.

base_time is a base time point expressed in nanoseconds in the CLOCK_MONOTONIC timebase and time_interval is the time in nanoseconds between entries in the buffer. base_time must be in the past.

For a given point in time t expressed in nanoseconds in the CLOCK_MONOTONIC timebase the index of the corresponding pose in the pose buffer can be computed as follows:

index(t) = ((t - base_time) / time_interval) % num_entries

poses[index(t)] is valid for t over the time interval (t - time_interval, t] and should be expected to updated continuously without synchronization for the duration of that interval. If a single pose value is needed for multiple non-atomic operations a value should be latched and stored outside the pose buffer.

Because the poses are not protected by any synchronization primitives it is possible that when a pose is latched it will be only partially updated, and the pose being read will contain some components from the pose before it is updated and some components from the updated pose. The safety of using these “torn” poses relies on two things:

  1. Sequential poses written to poses[index(t)] are very similar to each other numerically, so that if some components are taken from the first and some are taken from another the result is numerically similar to both

  2. The space of positions and quaternions is locally flat at the scale of changes between sequential updates, which guarantees that two poses which are numerically similar also represent semantically similar poses (i.e. there are no discontinuities which will cause a small numerical change in the position or quaterninon to cause a large change in the encoded pose) For positions this is guaranteed because Scenic uses a Euclidean 3-space which is globally flat and for quaternions this is guaranteed because quaternions encode rotation as points on a unit 4-sphere, and spheres are locally flat. For more details on the encoding of rotations in quaterions see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

This commanderation is intended for late latching camera pose to support low-latency motion-tracked rendering.

SetLightColorCmd {:#SetLightColorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the color of the Light identified by light_id.

SetLightDirectionCmd {:#SetLightDirectionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the direction of the DirectionalLight identified by light_id.

AddLightCmd {:#AddLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

DEPRECATED Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

DetachLightCmd {:#DetachLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detach the light specified by light_id from the scene that it is attached to, if any.

DetachLightsCmd {:#DetachLightsCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detach all lights from the scene specified by scene_id.

SetTextureCmd {:#SetTextureCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a material's texture.

Constraints:

  • material_id refs a Material.
  • texture_id refs a Image, ImagePipe, or nothing.

If no texture is provided (i.e. texture_id is zero), a solid color is used. If a texture is provided, then the value sampled from the texture is multiplied by the color.

SetColorCmd {:#SetColorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a material's color.

Constraints:

  • material_id refs a Material.

If a texture is set on the material, then the value sampled from the texture is multiplied by the color.

MeshVertexFormat {:#MeshVertexFormat}

Defined in fuchsia.ui.gfx/commands.fidl

BindMeshBuffersCmd {:#BindMeshBuffersCmd}

Defined in fuchsia.ui.gfx/commands.fidl

AddLayerCmd {:#AddLayerCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Add a layer to a layer stack. Constraints:

  • layer_stack_id refs a LayerStack.
  • layer_id refs a Layer.
  • The layer must not already belong to a different stack; it must first be detached.

RemoveLayerCmd {:#RemoveLayerCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Remove a layer from a layer stack. Constraints:

  • layer_stack_id refs a LayerStack.
  • layer_id refs a Layer.
  • The layer must belong to this stack.

RemoveAllLayersCmd {:#RemoveAllLayersCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Remove all layers from a layer stack. Constraints

  • layer_stack_id refs a LayerStack.

SetLayerStackCmd {:#SetLayerStackCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Set a compositor's layer stack, replacing the current stack (if any). Constraints:

  • compositor_id refs a DisplayCompositor or ImagePipeCompositor.
  • layer_stack_id refs a LayerStack.

SetRendererCmd {:#SetRendererCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Set a layer's renderer, replacing the current renderer (if any). Constraints:

  • layer_id refs a Layer.
  • renderer_id refs a Renderer.

SetRendererParamCmd {:#SetRendererParamCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a parameter that affects how a renderer renders a scene.

renderer_id refs the Renderer that is being modified. param describes the parameter that should be set, and to what.

SetEventMaskCmd {:#SetEventMaskCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets which events a resource should deliver to the session listener. This command replaces any prior event mask for the resource.

The initial event mask for a resource is zero, meaning no events are reported.

Constraints:

  • resource_id is a valid resource id
  • event_mask is zero or a combination of k*EventMask bits OR'ed together.

SetLabelCmd {:#SetLabelCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a label to help developers identify the purpose of the resource when using diagnostic tools.

The label serves no functional purpose in the scene graph. It exists only to help developers understand its structure. The scene manager may truncate or discard labels at will.

Constraints:

  • The label's maximum length is kLabelMaxLength characters.
  • Setting the label to an empty string clears it.

SetDisableClippingCmd {:#SetDisableClippingCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Set whether clipping should be disabled for the specified renderer. For a newly-created renderer, clipping will NOT be disabled (i.e. it will be enabled).

NOTE: this disables visual clipping only; objects are still clipped for the purposes of hit-testing.

renderer_id refs the target renderer. disable_clipping specifies whether the clipping should be disabled.

SetImportFocusCmdDEPRECATED {:#SetImportFocusCmdDEPRECATED}

Defined in fuchsia.ui.gfx/commands.fidl

SetClipPlanesCmd {:#SetClipPlanesCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the list of clip planes that apply to a Node and all of its children. Replaces the list set by any previous SetClipPlanesCmd.

  • node_id refs a Node with the has_clip characteristic.
  • clip_planes is the new list of oriented clip planes.

SetPointLightPositionCmd {:#SetPointLightPositionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the position of the PointLight identified by light_id.

SetPointLightFalloffCmd {:#SetPointLightFalloffCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the falloff factor of the PointLight identified by light_id. A value of 1.0 corresponds to the physically-based “inverse-square law” (see Wikipedia). Other values can be used for artistic effect, e.g. a value of 0.0 means that the radiance of a surface is not dependant on its distance from the light.

SceneAddAmbientLightCmd {:#SceneAddAmbientLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

SceneAddDirectionalLightCmd {:#SceneAddDirectionalLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

SceneAddPointLightCmd {:#SceneAddPointLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

SetDisplayColorConversionCmdHACK {:#SetDisplayColorConversionCmdHACK}

Defined in fuchsia.ui.gfx/commands.fidl

Set the color conversion applied to the compositor's display. The conversion is applied to to each pixel according to the formula:

(matrix * (pixel + preoffsets)) + postoffsets

where pixel is a column vector consisting of the pixel's 3 components.

matrix is passed in row-major order. Clients will be responsible for passing default values, when needed. Default values are not currently supported in fidl. Default Values: preoffsets = [0 0 0] matrix = [1 0 0 0 1 0 0 0 1] postoffsets = [0 0 0]

SetDisplayRotationCmdHACK {:#SetDisplayRotationCmdHACK}

Defined in fuchsia.ui.gfx/commands.fidl

Depending on the device, the display might be rotated with respect to what the lower level device controller considers the physical orientation of pixels. The compositors and layers must be in alignment with the underlying physical orientation which means that for certain operations like screenshotting, they cannot provide results with the accurate orientation unless they have information about how the higher-level display is orienting the screen. The only legal values for the rotation are 0, 90, 180, and 270, which are each applied counterclockwise.

SetEnableDebugViewBoundsCmd {:#SetEnableDebugViewBoundsCmd}

Defined in fuchsia.ui.gfx/commands.fidl

SetViewHolderBoundsColorCmd {:#SetViewHolderBoundsColorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

DisplayInfo {:#DisplayInfo}

Defined in fuchsia.ui.gfx/display_info.fidl

Provides information about a display.

MetricsEvent {:#MetricsEvent}

Defined in fuchsia.ui.gfx/events.fidl

Provides rendering target metrics information about the specified node.

This event is delivered when the following conditions are true:

  • The node is a descendant of a Scene.
  • The node has kMetricsEventMask set to an enabled state.
  • The node's metrics have changed since they were last delivered, or since kMetricsEventMask transitioned from a disabled state to an enabled state.

Subscribe to this event to receive information about the scale factors you should apply when generating textures for your nodes.

SizeChangeHintEvent {:#SizeChangeHintEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered in response to a size change hint from a parent node (SendSizeChangeHintCmd).

This event is delivered when the following conditions are true:

  • The node has kSizeChangeEventMask set to an enabled state.
  • A parent node has sent a SendSizeChangeHintCmd.

Subscribe to this event to receive information about how large textures you will need in the near future for your nodes. The canonical use case is to pre-allocate memory to avoid repeated re-allocations.

ImportUnboundEvent {:#ImportUnboundEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered when the imported resource with the given ID is no longer bound to its host resource, or if the imported resource can not be bound because the host resource is not available.

ViewConnectedEvent {:#ViewConnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View is connected.

ViewDisconnectedEvent {:#ViewDisconnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View is disconnected or destroyed.

If the View is destroyed before the connection is established, then this event will be delivered immediately when the ViewHolder attempts to connect.

ViewHolderDisconnectedEvent {:#ViewHolderDisconnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when its peer ViewHolder is disconnected or destroyed.

If the ViewHolder is destroyed before the connection is established, then this event will be delivered immediately when the View attempts to connect.

ViewHolderConnectedEvent {:#ViewHolderConnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when its peer ViewHolder is connected.

If the ViewHolder is destroyed before the connection is established, then this event will not be delivered.

ViewAttachedToSceneEvent {:#ViewAttachedToSceneEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when the parent ViewHolder for the given View becomes a part of a Scene.

A ViewHolder is considered to be part of a Scene if there is an unbroken chain of parent-child relationships between the Scene node and the ViewHolder node.

ViewDetachedFromSceneEvent {:#ViewDetachedFromSceneEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when the parent ViewHolder for the given View is no longer part of a scene.

This can happen if the ViewHolder is detached directly from the scene, or if one of its parent nodes is.

A ViewHolder is considered to be part of a Scene if there is an unbroken chain of parent-child relationships between the Scene node and the ViewHolder node.

ViewPropertiesChangedEvent {:#ViewPropertiesChangedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered when the parent ViewHolder for the given View makes a change to the View's properties.

ViewStateChangedEvent {:#ViewStateChangedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder‘s Session when its peer View’s state has changed.

Hit {:#Hit}

Defined in fuchsia.ui.gfx/hit.fidl

Describes where a hit occurred within the content of a node tagged by this session.

To compute the point of intersection within the node's local coordinate system, perform the following calculation using the ray which was originally passed to Session.HitTest().

hit_point = ray.origin + (hit.distance * ray.direction) local_point = hit.inverse_transform * hit_point

ShapeNodeArgs {:#ShapeNodeArgs}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_parent
  • has_shape
  • has_material

ClipNodeArgs {:#ClipNodeArgs}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_parent
  • is_clip
  • has_parts

OpacityNodeArgsHACK {:#OpacityNodeArgsHACK}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_transform
  • has_parent
  • has_children
  • has_parts
  • has_opacity

EntityNodeArgs {:#EntityNodeArgs}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_transform
  • has_children
  • has_parent
  • has_parts
  • has_clip

ImagePipeArgs {:#ImagePipeArgs}

Defined in fuchsia.ui.gfx/resources.fidl

ImagePipe2Args {:#ImagePipe2Args}

Defined in fuchsia.ui.gfx/resources.fidl

ImagePipe2 is a Resource that can be used as a Texture for a Material.

MemoryArgs {:#MemoryArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Memory is a Resource that wraps a client-provided Zircon vmo to register it with Scenic.

ImageArgs {:#ImageArgs}

Defined in fuchsia.ui.gfx/resources.fidl

An image mapped to a range of a Memory resource.

BufferArgs {:#BufferArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A buffer mapped to a range of Memory.

ViewArgs {:#ViewArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Represents the root of a subgraph within a larger scene graph. Nodes can be attached to the View as children, and these Nodes will have the Views' coordinate transform applied to their own, in addition to being clipped to the Views' bounding box. See ViewProperties.

Each View is linked to a paired ViewHolder via a shared token pair.

Usually the View and its associated ViewHolder exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

ViewArgs2 {:#ViewArgs2}

Defined in fuchsia.ui.gfx/resources.fidl

ViewArgs3 {:#ViewArgs3}

Defined in fuchsia.ui.gfx/resources.fidl

Represents the root of a subgraph within a larger scene graph. Nodes can be attached to the |View| as children, and these Nodes will have the |View|s' coordinate transform applied to their own, in addition to being clipped to the |View|s' bounding box. See |ViewProperties|.

Each |View| is linked to a paired |ViewHolder| via a shared token pair.

Usually the |View| and its associated |ViewHolder| exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

Clients self-identify their |View| with a |ViewRef|, which is a stable identifier that may be cloned and passed to other components in a feed-forward style. It is accompanied by a |ViewRefControl|, which Scenic uses to signal |View| destruction across the system; the |ViewRefControl| must be unique - do not clone it.

ViewHolderArgs {:#ViewHolderArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Represents an attachment point for a subgraph within a larger scene graph. The ViewHolder can be attached to a Node as a child, and the contents of the linked View will become a child of the Node as well.

Each ViewHolder is linked to a paired View via a shared token pair.

Usually the ViewHolder and its associated View exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

ViewHolderArgs2 {:#ViewHolderArgs2}

Defined in fuchsia.ui.gfx/resources.fidl

CompositorArgs {:#CompositorArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Compositor draws its LayerStack into a framebuffer provided by its attached Display, if any. If no display is attached, nothing is rendered.

DisplayCompositorArgs {:#DisplayCompositorArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A DisplayCompositor draws its attached LayerStack into an image that is presented on a display.

ImagePipeCompositorArgs {:#ImagePipeCompositorArgs}

Defined in fuchsia.ui.gfx/resources.fidl

An ImagePipeCompositor draws its attached LayerStack into an image that is presented on an image-pipe.

LayerStackArgs {:#LayerStackArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A LayerStack is a stack of layers that are attached to a Compositor, which draws them in order of increasing Z-order (or rather, presents the illusion of drawing them in that order: it may apply any optimizations that don't affect the output).

Supported commands:

  • AddLayer

LayerArgs {:#LayerArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Layer is a 2-dimensional image that is drawn by a Compositor. The contents of each Layer in a Layerstack are independent of each other. A layer is not drawn unless it has a camera, texture, or color.

Supported commands:

  • Detach
  • SetCamera
  • SetColor
  • SetTexture
  • SetSize (depth must be zero)
  • SetSize
  • SetTranslation (z component determines the relative Z-ordering of layers)
  • SetRotation (must rotate around Z-axis)
  • SetScale

SceneArgs {:#SceneArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Scene is the root of a scene-graph, and defines the rendering environment (lighting, etc.) for the tree of nodes beneath it.

Supported commands:

  • Add/RemoveLight
  • AddChild

CameraArgs {:#CameraArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Camera is used to render a Scene from a particular viewpoint. This is achieved by setting a Renderer to use the camera.

The following commands may be applied to a Camera:

  • SetCameraTransform
  • SetCameraProjection
  • SetCameraPoseBuffer

StereoCameraArgs {:#StereoCameraArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A StereoCamera is a Camera that renders the scene in side-by-side stereo.

Any command which can be applied to a Camera can also be applied to a StereoCamera. Additional supported commands:

  • SetStereoCameraProjection

RendererArgs {:#RendererArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Renderer renders a Scene via a Camera.

Supported commands:

  • SetCamera
  • SetRendererParam

AmbientLightArgs {:#AmbientLightArgs}

Defined in fuchsia.ui.gfx/resources.fidl

An AmbientLight is a Light that is is assumed to be everywhere in the scene, in all directions.

Supported commands:

  • SetLightColor

DirectionalLightArgs {:#DirectionalLightArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A DirectionalLight is a Light that is emitted from a point at infinity.

Although the light is directional, the light has some amount of angular dispersion (i.e., the light is not fully columnated). For simplicity, we assume the dispersion of the light source is symmetric about the light's primary direction.

Supported commands:

  • SetLightColor
  • SetLightDirection

PointLightArgs {:#PointLightArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A PointLight is a Light that emits light in all directions. By default, the intensity of the light falls off according to the physically based “inverse-square law” (see Wikipedia), although it can be adjusted to other values for artistic effect.

Supported commands:

  • SetLightColor
  • SetPointLightPosition
  • SetPointLightFalloff

MaterialArgs {:#MaterialArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Simple texture-mapped material.

Supported commands:

  • SetTextureCmd: sets the texture, or it can be left as zero (no texture). The texture can be an Image or ImagePipe.
  • SetColorCmd: sets the color.

VariableArgs {:#VariableArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Describes a typed, client-modifiable value.

RectangleArgs {:#RectangleArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

Rectangle centered at (0,0).

RoundedRectangleArgs {:#RoundedRectangleArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

RoundedRectangle centered at (0,0). Legal parameter values must satisfy the constraint that the flat sides of the rectangle have non-negative length. In other words, the following constraints must hold:

  • top_left_radius + top_right_radius <= width
  • bottom_left_radius + bottom_right_radius <= width
  • top_left_radius + bottom_left_radius <= height
  • top_right_radius + bottom_right_radius <= height

CircleArgs {:#CircleArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

MeshArgs {:#MeshArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

A Mesh cannot be rendered until it has been bound to vertex/index buffers; see BindMeshBuffersCmd.

ImportToken {:#ImportToken}

Defined in fuchsia.ui.gfx/tokens.fidl

Token that uniquely identifies an attachment point for a subgraph in the global scene graph. Each ImportToken has exactly one corresponding ExportToken.

A Scenic client can reference contents from another client by creating a typed resource using this token. The other client must also create a correspondingly typed resource using the corresponding ExportToken.

The exact nature of the inter-client reference depends on the specific resources created from the tokens. For example, creating a ViewHolder resource from this token allows a client to embed another client's View.

ExportToken {:#ExportToken}

Defined in fuchsia.ui.gfx/tokens.fidl

Token that uniquely identifies a root point for a subgraph in the global scene graph. Each ExportToken has exactly one corresponding ImportToken.

A Scenic client can have its contents referenced from another client by creating a typed resource using this token. The other client must also create a correspondingly typed resource using the corresponding ImportToken.

The exact nature of the inter-client reference depends on the specific resources created from the tokens. For example, creating a View resource from this token allows everything attached to the View to be embedded in another clients ViewHolder.

vec2 {:#vec2}

Defined in fuchsia.ui.gfx/types.fidl

vec3 {:#vec3}

Defined in fuchsia.ui.gfx/types.fidl

vec4 {:#vec4}

Defined in fuchsia.ui.gfx/types.fidl

mat4 {:#mat4}

Defined in fuchsia.ui.gfx/types.fidl

ColorRgba {:#ColorRgba}

Defined in fuchsia.ui.gfx/types.fidl

ColorRgb {:#ColorRgb}

Defined in fuchsia.ui.gfx/types.fidl

Quaternion {:#Quaternion}

Defined in fuchsia.ui.gfx/types.fidl

Plane3 {:#Plane3}

Defined in fuchsia.ui.gfx/types.fidl

Oriented plane described by a normal vector and a distance from the origin along that vector.

FactoredTransform {:#FactoredTransform}

Defined in fuchsia.ui.gfx/types.fidl

FloatValue {:#FloatValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a float32, and value is ignored.

Vector2Value {:#Vector2Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec2, and value is ignored.

Vector3Value {:#Vector3Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec3, and value is ignored.

Vector4Value {:#Vector4Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec4, and value is ignored.

Matrix4Value {:#Matrix4Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec4, and value is ignored.

ColorRgbValue {:#ColorRgbValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a ColorRgb, and value is ignored.

ColorRgbaValue {:#ColorRgbaValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a ColorRgba, and value is ignored.

QuaternionValue {:#QuaternionValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a Quaternion, and value is ignored.

Metrics {:#Metrics}

Defined in fuchsia.ui.gfx/types.fidl

Rendering target metrics associated with a node. See also MetricsEvent.

This scale factors change in relation to the resolution of the rendering target and the scale transformations applied by containing nodes. They are always strictly positive and non-zero.

For example, suppose the rendering target is a high resolution display with a device pixel ratio of 2.0 meaning that each logical pixel within the model corresponds to two physical pixels of the display. Assuming no scale transformations affect the node, then its metrics event will report a scale factor of 2.0.

Building on this example, if instead the node‘s parent applies a scale transformation of 0.25 to the node, then the node’s metrics event will report a scale factor of 0.5 indicating that the node should render its content at a reduced resolution and level of detail since a smaller area of physical pixels (half the size in each dimension) will be rendered.

BoundingBox {:#BoundingBox}

Defined in fuchsia.ui.gfx/types.fidl

Represents an axis-aligned bounding box. If any of the dimensions has a negative extent (e.g. max.x < min.x) then the bounding box is treated as empty.

ViewProperties {:#ViewProperties}

Defined in fuchsia.ui.gfx/types.fidl

Represents the properties for a View.

ViewState {:#ViewState}

Defined in fuchsia.ui.gfx/types.fidl

Represents the state of a View in Scenic.

CreateResourceCmd {:#CreateResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Instructs the compositor to create the specified Resource, and to register it in a table so that it can be referenced by subsequent commands.

ReleaseResourceCmd {:#ReleaseResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Releases the client's reference to the resource; it is then illegal to use the ID in subsequent Commands. Other references to the resource may exist, so releasing the resource does not result in its immediate destruction; it is only destroyed once the last reference is released. For example, the resource may be required to render an in-progress frame, or it may be referred to by another resource). However, the ID will be immediately unregistered, and may be reused to create a new resource.

ExportResourceCmd {:#ExportResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Create an external reference to the specified resource, which can then be imported into another Session by passing a handle to token's peer to ImportResourceCmd; see that comment for more details.

The importing client is typically in a different process than the exporter. No specific mechanism is provided for transferring a token from an exporter to an importer; collaborators may choose any out-of-band API they wish to do so.

ImportResourceCmd {:#ImportResourceCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Import a resource that was exported via ExportResourceCmd(). token is a handle to the eventpair peer that was used to export the resource, and spec describes the type of the imported resource, and the commands which can legally be applied to it. Afterward, id can be used to refer to the resource in an Command, similarly (but not identically: see below) to a resource that was created in the session. For example, you can add children to an imported EntityNode via AddChildCmd.

However, note that the importer does not gain full access to the imported resource, but rather to an attenuated subset of its capabilities. For example, you cannot use a DetachCmd to detach an imported EntityNode from its parent.

Unlike ExportResourceCmd, there is no configurable timeout. There is an expectation that the exported resource will become available in a short amount of time. TODO: this needs elaboration... e.g. we might notify via the SessionListener when we know that the link will never be made (e.g. if the peer of the import token is destroyed).

SetTagCmd {:#SetTagCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's tag value.

A session can apply a tag value to any node to which it has access, including imported nodes. These tags are private to the session and cannot be read or modified by other sessions. When multiple sessions import the same node, each session will only observe its own tag values.

Hit test results for a session only include nodes which the session has tagged with a non-zero value. Therefore a session can use tag values to associate nodes with their functional purpose when picked.

Constraints:

  • node_id refs a Node.
  • tag_value is the tag value to assign, or 0 to remove the tag.

DetachCmd {:#DetachCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detaches a parentable object from its parent (e.g. a node from a parent node, or a layer from a layer stack). It is illegal to apply this command to a non-parentable object. No-op if the target object currently has no parent.

Constraints:

  • id refs a parentable object

Discussion: For nodes, this command will detach a node from its parent, regardless of whether it is a part or a child of its parent.

SetTranslationCmd {:#SetTranslationCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) translation.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetScaleCmd {:#SetScaleCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) scale.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetRotationCmd {:#SetRotationCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) rotation.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetAnchorCmd {:#SetAnchorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a Resource‘s (typically a Node’s) anchor point.

Constraints:

  • id refs a Resource with the has_transform characteristic.

SetSizeCmd {:#SetSizeCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets an object's size.

Constraints:

  • id refs a resizeable object.
  • some objects that support this command may have additional constraints (e.g. in some cases depth must be zero).

SetOpacityCmd {:#SetOpacityCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's opacity.

Constraints:

  • node_id refs a Node with the has_opacity characteristic.
  • opacity is in the range [0, 1].

SendSizeChangeHintCmdHACK {:#SendSizeChangeHintCmdHACK}

Defined in fuchsia.ui.gfx/commands.fidl

Sends a hint about a pending size change to the given node and all nodes below. This is generally sent before an animation.

width_change_factor and height_change_factor is how much bigger or smaller the item is expected to be in the near future. This one number encapsulate both changes in scale, as well as changes to layout width and height.

AddChildCmd {:#AddChildCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Add a node as a child to another node.

Constraints:

  • id refs a Node with the has_children characteristic.
  • child_id refs any Node.

Discussion: The child node is first removed from its existing parent, as if DetachCmd was applied first.

AddPartCmd {:#AddPartCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Add a node as a part of another node. The implications of being a part rather than a child differ based on the type of the part. However, one implication is constant: removing all of a node's children (e.g. via DetachChildrenCmd) does not affect its parts. This is similar to the “shadow DOM” in a web browser: the controls of a element are implemented as using the shadow DOM, and do no show up amongst the children of that element.

Constraints:

  • id refs a Node with the has_parts characteristic.
  • part_id refs any Node.

Discussion: The part node is first removed from its existing parent, as if DetachCmd was applied first.

DetachChildrenCmd {:#DetachChildrenCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detaches all of a node's children (but not its parts).

SetShapeCmd {:#SetShapeCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's shape.

Constraints:

  • node_id refs a Node with the has_shape characteristic.
  • shape_id refs a Shape, or nothing.
  • if this command causes the target to have both a Shape and a Material, then these must be compatible with each other (see README.md regarding “Shape/Material Compatibility”).

Discussion: In order to be painted, a node requires both a Shape and a Material. Without a material, a node can still participate in hit-testing and clipping. Without a shape, a node cannot do any of the above.

SetMaterialCmd {:#SetMaterialCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's material.

Constraints:

  • node_id refs a Node with the has_material characteristic.
  • material_id refs a Material, or nothing.
  • if this command causes the target to have both a Shape and a Material, then these must be compatible with each other (see README.md regarding “Shape/Material Compatibility”).

Discussion: In order to be painted, a node requires both a Shape and a Material. Without a material, a node can still participate in hit-testing and clipping. Without a shape, a node cannot do any of the above.

SetClipCmd {:#SetClipCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a node's clip. DEPRECATED: use SetClipPlanesCmd.

Constraints:

  • node_id refs a Node with the has_clip characteristic.
  • clip_id a Node with the is_clip characteristic, or nothing. If the referenced node is not rooted, then it will have no effect (since its full world-transform cannot be determined).
  • clip_to_self If false, children are only clipped to the region specified by clip_id. If true, children are additionally clipped to the node's shape (as determined by its ShapeNode parts).

Discussion: If a node has a clip, it will be applied to both the parts and the children of the node. Under some circumstances (TBD), a clip will not be applicable to a node; in such cases it will be as though no clip has been specified for the node.

SetHitTestBehaviorCmd {:#SetHitTestBehaviorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a node's hit test behavior.

Discussion: By default, hit testing is performed on the node's content, its parts, and its children.

SetViewPropertiesCmd {:#SetViewPropertiesCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the properties for a ViewHolder's attached View.

Constraints:

  • view_holder_id refs a ViewHolder.

TakeSnapshotCmdDEPRECATED {:#TakeSnapshotCmdDEPRECATED}

Defined in fuchsia.ui.gfx/commands.fidl

SetCameraCmd {:#SetCameraCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a renderer's camera.

Constraints:

  • renderer_id refs a Renderer.
  • camera_id refs a Camera, or stops rendering by passing zero.
  • matrix is a value or variable of type kMatrix4x4.

SetCameraTransformCmd {:#SetCameraTransformCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's view matrix. This operation can be applied to both Cameras and StereoCameras.

Constraints:

  • camera_id refs a Camera.
  • eye_position is the position of the eye.
  • eye_look_at is the point is the scene the that eye is pointed at.
  • eye_up defines the camera's “up” vector.

SetCameraProjectionCmd {:#SetCameraProjectionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's projection matrix. This operation cannot be applied to a StereoCamera.

Constraints:

  • camera_id refs a Camera that is not a StereoCamera.
  • fovy is the Y-axis field of view, in radians.

NOTE: A default orthographic projection is specified by setting fovy to zero. In this case, the camera transform is ignored.

SetStereoCameraProjectionCmd {:#SetStereoCameraProjectionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a StereoCamera's projection matrices. This operation can only be applied to a StereoCamera.

Constraints:

  • camera_id refs a StereoCamera.
  • left_projection is the projection matrix for the left eye.
  • right_projection is the projection matrix for the right eye.

These projection matrices may also contain a transform in camera space for their eye if needed.

SetCameraClipSpaceTransformCmd {:#SetCameraClipSpaceTransformCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a camera's clip-space transform.

Constraints:

  • camera_id refs a Camera.
  • translation is the desired translation, in Vulkan NDC.
  • scale is the scale factor to apply before translation.

SetCameraPoseBufferCmd {:#SetCameraPoseBufferCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the “pose buffer” for the camera identified by camera_id. This operation can be applied to both Cameras and StereoCameras.

This will override any position and rotation set for the camera and will make it take its position and rotation from the pose buffer each frame based on the presentation time for that frame.

A pose buffer represents a ring buffer of poses for a fixed number of time points in the future. Each entry in the buffer identified by buffer_id is a quaternion and a position layed out as follows:

struct Pose { // Quaternion float32 a; float32 b; float32 c; float32 d;

// Position float32 x; float32 y; float32 z;

// Reserved/Padding byte[4] reserved; }

The buffer can be thought of as a packed array of num_entries Pose structs and is required to be at least num_entries * sizeof(Pose) bytes.

The quaternions and positions are specified in the space of the camera's parent node.

base_time is a base time point expressed in nanoseconds in the CLOCK_MONOTONIC timebase and time_interval is the time in nanoseconds between entries in the buffer. base_time must be in the past.

For a given point in time t expressed in nanoseconds in the CLOCK_MONOTONIC timebase the index of the corresponding pose in the pose buffer can be computed as follows:

index(t) = ((t - base_time) / time_interval) % num_entries

poses[index(t)] is valid for t over the time interval (t - time_interval, t] and should be expected to updated continuously without synchronization for the duration of that interval. If a single pose value is needed for multiple non-atomic operations a value should be latched and stored outside the pose buffer.

Because the poses are not protected by any synchronization primitives it is possible that when a pose is latched it will be only partially updated, and the pose being read will contain some components from the pose before it is updated and some components from the updated pose. The safety of using these “torn” poses relies on two things:

  1. Sequential poses written to poses[index(t)] are very similar to each other numerically, so that if some components are taken from the first and some are taken from another the result is numerically similar to both

  2. The space of positions and quaternions is locally flat at the scale of changes between sequential updates, which guarantees that two poses which are numerically similar also represent semantically similar poses (i.e. there are no discontinuities which will cause a small numerical change in the position or quaterninon to cause a large change in the encoded pose) For positions this is guaranteed because Scenic uses a Euclidean 3-space which is globally flat and for quaternions this is guaranteed because quaternions encode rotation as points on a unit 4-sphere, and spheres are locally flat. For more details on the encoding of rotations in quaterions see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

This commanderation is intended for late latching camera pose to support low-latency motion-tracked rendering.

SetLightColorCmd {:#SetLightColorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the color of the Light identified by light_id.

SetLightDirectionCmd {:#SetLightDirectionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the direction of the DirectionalLight identified by light_id.

AddLightCmd {:#AddLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

DEPRECATED Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

DetachLightCmd {:#DetachLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detach the light specified by light_id from the scene that it is attached to, if any.

DetachLightsCmd {:#DetachLightsCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Detach all lights from the scene specified by scene_id.

SetTextureCmd {:#SetTextureCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a material's texture.

Constraints:

  • material_id refs a Material.
  • texture_id refs a Image, ImagePipe, or nothing.

If no texture is provided (i.e. texture_id is zero), a solid color is used. If a texture is provided, then the value sampled from the texture is multiplied by the color.

SetColorCmd {:#SetColorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a material's color.

Constraints:

  • material_id refs a Material.

If a texture is set on the material, then the value sampled from the texture is multiplied by the color.

MeshVertexFormat {:#MeshVertexFormat}

Defined in fuchsia.ui.gfx/commands.fidl

BindMeshBuffersCmd {:#BindMeshBuffersCmd}

Defined in fuchsia.ui.gfx/commands.fidl

AddLayerCmd {:#AddLayerCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Add a layer to a layer stack. Constraints:

  • layer_stack_id refs a LayerStack.
  • layer_id refs a Layer.
  • The layer must not already belong to a different stack; it must first be detached.

RemoveLayerCmd {:#RemoveLayerCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Remove a layer from a layer stack. Constraints:

  • layer_stack_id refs a LayerStack.
  • layer_id refs a Layer.
  • The layer must belong to this stack.

RemoveAllLayersCmd {:#RemoveAllLayersCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Remove all layers from a layer stack. Constraints

  • layer_stack_id refs a LayerStack.

SetLayerStackCmd {:#SetLayerStackCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Set a compositor's layer stack, replacing the current stack (if any). Constraints:

  • compositor_id refs a DisplayCompositor or ImagePipeCompositor.
  • layer_stack_id refs a LayerStack.

SetRendererCmd {:#SetRendererCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Set a layer's renderer, replacing the current renderer (if any). Constraints:

  • layer_id refs a Layer.
  • renderer_id refs a Renderer.

SetRendererParamCmd {:#SetRendererParamCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets a parameter that affects how a renderer renders a scene.

renderer_id refs the Renderer that is being modified. param describes the parameter that should be set, and to what.

SetEventMaskCmd {:#SetEventMaskCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets which events a resource should deliver to the session listener. This command replaces any prior event mask for the resource.

The initial event mask for a resource is zero, meaning no events are reported.

Constraints:

  • resource_id is a valid resource id
  • event_mask is zero or a combination of k*EventMask bits OR'ed together.

SetLabelCmd {:#SetLabelCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets/clears a label to help developers identify the purpose of the resource when using diagnostic tools.

The label serves no functional purpose in the scene graph. It exists only to help developers understand its structure. The scene manager may truncate or discard labels at will.

Constraints:

  • The label's maximum length is kLabelMaxLength characters.
  • Setting the label to an empty string clears it.

SetDisableClippingCmd {:#SetDisableClippingCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Set whether clipping should be disabled for the specified renderer. For a newly-created renderer, clipping will NOT be disabled (i.e. it will be enabled).

NOTE: this disables visual clipping only; objects are still clipped for the purposes of hit-testing.

renderer_id refs the target renderer. disable_clipping specifies whether the clipping should be disabled.

SetImportFocusCmdDEPRECATED {:#SetImportFocusCmdDEPRECATED}

Defined in fuchsia.ui.gfx/commands.fidl

SetClipPlanesCmd {:#SetClipPlanesCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the list of clip planes that apply to a Node and all of its children. Replaces the list set by any previous SetClipPlanesCmd.

  • node_id refs a Node with the has_clip characteristic.
  • clip_planes is the new list of oriented clip planes.

SetPointLightPositionCmd {:#SetPointLightPositionCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the position of the PointLight identified by light_id.

SetPointLightFalloffCmd {:#SetPointLightFalloffCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Sets the falloff factor of the PointLight identified by light_id. A value of 1.0 corresponds to the physically-based “inverse-square law” (see Wikipedia). Other values can be used for artistic effect, e.g. a value of 0.0 means that the radiance of a surface is not dependant on its distance from the light.

SceneAddAmbientLightCmd {:#SceneAddAmbientLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

SceneAddDirectionalLightCmd {:#SceneAddDirectionalLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

SceneAddPointLightCmd {:#SceneAddPointLightCmd}

Defined in fuchsia.ui.gfx/commands.fidl

Adds the light specified by light_id specified by light_id to the scene identified by scene_id.

SetDisplayColorConversionCmdHACK {:#SetDisplayColorConversionCmdHACK}

Defined in fuchsia.ui.gfx/commands.fidl

Set the color conversion applied to the compositor's display. The conversion is applied to to each pixel according to the formula:

(matrix * (pixel + preoffsets)) + postoffsets

where pixel is a column vector consisting of the pixel's 3 components.

matrix is passed in row-major order. Clients will be responsible for passing default values, when needed. Default values are not currently supported in fidl. Default Values: preoffsets = [0 0 0] matrix = [1 0 0 0 1 0 0 0 1] postoffsets = [0 0 0]

SetDisplayRotationCmdHACK {:#SetDisplayRotationCmdHACK}

Defined in fuchsia.ui.gfx/commands.fidl

Depending on the device, the display might be rotated with respect to what the lower level device controller considers the physical orientation of pixels. The compositors and layers must be in alignment with the underlying physical orientation which means that for certain operations like screenshotting, they cannot provide results with the accurate orientation unless they have information about how the higher-level display is orienting the screen. The only legal values for the rotation are 0, 90, 180, and 270, which are each applied counterclockwise.

SetEnableDebugViewBoundsCmd {:#SetEnableDebugViewBoundsCmd}

Defined in fuchsia.ui.gfx/commands.fidl

SetViewHolderBoundsColorCmd {:#SetViewHolderBoundsColorCmd}

Defined in fuchsia.ui.gfx/commands.fidl

DisplayInfo {:#DisplayInfo}

Defined in fuchsia.ui.gfx/display_info.fidl

Provides information about a display.

MetricsEvent {:#MetricsEvent}

Defined in fuchsia.ui.gfx/events.fidl

Provides rendering target metrics information about the specified node.

This event is delivered when the following conditions are true:

  • The node is a descendant of a Scene.
  • The node has kMetricsEventMask set to an enabled state.
  • The node's metrics have changed since they were last delivered, or since kMetricsEventMask transitioned from a disabled state to an enabled state.

Subscribe to this event to receive information about the scale factors you should apply when generating textures for your nodes.

SizeChangeHintEvent {:#SizeChangeHintEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered in response to a size change hint from a parent node (SendSizeChangeHintCmd).

This event is delivered when the following conditions are true:

  • The node has kSizeChangeEventMask set to an enabled state.
  • A parent node has sent a SendSizeChangeHintCmd.

Subscribe to this event to receive information about how large textures you will need in the near future for your nodes. The canonical use case is to pre-allocate memory to avoid repeated re-allocations.

ImportUnboundEvent {:#ImportUnboundEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered when the imported resource with the given ID is no longer bound to its host resource, or if the imported resource can not be bound because the host resource is not available.

ViewConnectedEvent {:#ViewConnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View is connected.

ViewDisconnectedEvent {:#ViewDisconnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder's Session when its peer View is disconnected or destroyed.

If the View is destroyed before the connection is established, then this event will be delivered immediately when the ViewHolder attempts to connect.

ViewHolderDisconnectedEvent {:#ViewHolderDisconnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when its peer ViewHolder is disconnected or destroyed.

If the ViewHolder is destroyed before the connection is established, then this event will be delivered immediately when the View attempts to connect.

ViewHolderConnectedEvent {:#ViewHolderConnectedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when its peer ViewHolder is connected.

If the ViewHolder is destroyed before the connection is established, then this event will not be delivered.

ViewAttachedToSceneEvent {:#ViewAttachedToSceneEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when the parent ViewHolder for the given View becomes a part of a Scene.

A ViewHolder is considered to be part of a Scene if there is an unbroken chain of parent-child relationships between the Scene node and the ViewHolder node.

ViewDetachedFromSceneEvent {:#ViewDetachedFromSceneEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a View's Session when the parent ViewHolder for the given View is no longer part of a scene.

This can happen if the ViewHolder is detached directly from the scene, or if one of its parent nodes is.

A ViewHolder is considered to be part of a Scene if there is an unbroken chain of parent-child relationships between the Scene node and the ViewHolder node.

ViewPropertiesChangedEvent {:#ViewPropertiesChangedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered when the parent ViewHolder for the given View makes a change to the View's properties.

ViewStateChangedEvent {:#ViewStateChangedEvent}

Defined in fuchsia.ui.gfx/events.fidl

Delivered to a ViewHolder‘s Session when its peer View’s state has changed.

Hit {:#Hit}

Defined in fuchsia.ui.gfx/hit.fidl

Describes where a hit occurred within the content of a node tagged by this session.

To compute the point of intersection within the node's local coordinate system, perform the following calculation using the ray which was originally passed to Session.HitTest().

hit_point = ray.origin + (hit.distance * ray.direction) local_point = hit.inverse_transform * hit_point

ShapeNodeArgs {:#ShapeNodeArgs}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_parent
  • has_shape
  • has_material

ClipNodeArgs {:#ClipNodeArgs}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_parent
  • is_clip
  • has_parts

OpacityNodeArgsHACK {:#OpacityNodeArgsHACK}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_transform
  • has_parent
  • has_children
  • has_parts
  • has_opacity

EntityNodeArgs {:#EntityNodeArgs}

Defined in fuchsia.ui.gfx/nodes.fidl

Characteristics:

  • has_transform
  • has_children
  • has_parent
  • has_parts
  • has_clip

ImagePipeArgs {:#ImagePipeArgs}

Defined in fuchsia.ui.gfx/resources.fidl

ImagePipe2Args {:#ImagePipe2Args}

Defined in fuchsia.ui.gfx/resources.fidl

ImagePipe2 is a Resource that can be used as a Texture for a Material.

MemoryArgs {:#MemoryArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Memory is a Resource that wraps a client-provided Zircon vmo to register it with Scenic.

ImageArgs {:#ImageArgs}

Defined in fuchsia.ui.gfx/resources.fidl

An image mapped to a range of a Memory resource.

BufferArgs {:#BufferArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A buffer mapped to a range of Memory.

ViewArgs {:#ViewArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Represents the root of a subgraph within a larger scene graph. Nodes can be attached to the View as children, and these Nodes will have the Views' coordinate transform applied to their own, in addition to being clipped to the Views' bounding box. See ViewProperties.

Each View is linked to a paired ViewHolder via a shared token pair.

Usually the View and its associated ViewHolder exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

ViewArgs2 {:#ViewArgs2}

Defined in fuchsia.ui.gfx/resources.fidl

ViewArgs3 {:#ViewArgs3}

Defined in fuchsia.ui.gfx/resources.fidl

Represents the root of a subgraph within a larger scene graph. Nodes can be attached to the |View| as children, and these Nodes will have the |View|s' coordinate transform applied to their own, in addition to being clipped to the |View|s' bounding box. See |ViewProperties|.

Each |View| is linked to a paired |ViewHolder| via a shared token pair.

Usually the |View| and its associated |ViewHolder| exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

Clients self-identify their |View| with a |ViewRef|, which is a stable identifier that may be cloned and passed to other components in a feed-forward style. It is accompanied by a |ViewRefControl|, which Scenic uses to signal |View| destruction across the system; the |ViewRefControl| must be unique - do not clone it.

ViewHolderArgs {:#ViewHolderArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Represents an attachment point for a subgraph within a larger scene graph. The ViewHolder can be attached to a Node as a child, and the contents of the linked View will become a child of the Node as well.

Each ViewHolder is linked to a paired View via a shared token pair.

Usually the ViewHolder and its associated View exist in separate processes. By combining them, the UI for an entire system can be built using content contributed from many different processes.

ViewHolderArgs2 {:#ViewHolderArgs2}

Defined in fuchsia.ui.gfx/resources.fidl

CompositorArgs {:#CompositorArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Compositor draws its LayerStack into a framebuffer provided by its attached Display, if any. If no display is attached, nothing is rendered.

DisplayCompositorArgs {:#DisplayCompositorArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A DisplayCompositor draws its attached LayerStack into an image that is presented on a display.

ImagePipeCompositorArgs {:#ImagePipeCompositorArgs}

Defined in fuchsia.ui.gfx/resources.fidl

An ImagePipeCompositor draws its attached LayerStack into an image that is presented on an image-pipe.

LayerStackArgs {:#LayerStackArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A LayerStack is a stack of layers that are attached to a Compositor, which draws them in order of increasing Z-order (or rather, presents the illusion of drawing them in that order: it may apply any optimizations that don't affect the output).

Supported commands:

  • AddLayer

LayerArgs {:#LayerArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Layer is a 2-dimensional image that is drawn by a Compositor. The contents of each Layer in a Layerstack are independent of each other. A layer is not drawn unless it has a camera, texture, or color.

Supported commands:

  • Detach
  • SetCamera
  • SetColor
  • SetTexture
  • SetSize (depth must be zero)
  • SetSize
  • SetTranslation (z component determines the relative Z-ordering of layers)
  • SetRotation (must rotate around Z-axis)
  • SetScale

SceneArgs {:#SceneArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Scene is the root of a scene-graph, and defines the rendering environment (lighting, etc.) for the tree of nodes beneath it.

Supported commands:

  • Add/RemoveLight
  • AddChild

CameraArgs {:#CameraArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Camera is used to render a Scene from a particular viewpoint. This is achieved by setting a Renderer to use the camera.

The following commands may be applied to a Camera:

  • SetCameraTransform
  • SetCameraProjection
  • SetCameraPoseBuffer

StereoCameraArgs {:#StereoCameraArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A StereoCamera is a Camera that renders the scene in side-by-side stereo.

Any command which can be applied to a Camera can also be applied to a StereoCamera. Additional supported commands:

  • SetStereoCameraProjection

RendererArgs {:#RendererArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A Renderer renders a Scene via a Camera.

Supported commands:

  • SetCamera
  • SetRendererParam

AmbientLightArgs {:#AmbientLightArgs}

Defined in fuchsia.ui.gfx/resources.fidl

An AmbientLight is a Light that is is assumed to be everywhere in the scene, in all directions.

Supported commands:

  • SetLightColor

DirectionalLightArgs {:#DirectionalLightArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A DirectionalLight is a Light that is emitted from a point at infinity.

Although the light is directional, the light has some amount of angular dispersion (i.e., the light is not fully columnated). For simplicity, we assume the dispersion of the light source is symmetric about the light's primary direction.

Supported commands:

  • SetLightColor
  • SetLightDirection

PointLightArgs {:#PointLightArgs}

Defined in fuchsia.ui.gfx/resources.fidl

A PointLight is a Light that emits light in all directions. By default, the intensity of the light falls off according to the physically based “inverse-square law” (see Wikipedia), although it can be adjusted to other values for artistic effect.

Supported commands:

  • SetLightColor
  • SetPointLightPosition
  • SetPointLightFalloff

MaterialArgs {:#MaterialArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Simple texture-mapped material.

Supported commands:

  • SetTextureCmd: sets the texture, or it can be left as zero (no texture). The texture can be an Image or ImagePipe.
  • SetColorCmd: sets the color.

VariableArgs {:#VariableArgs}

Defined in fuchsia.ui.gfx/resources.fidl

Describes a typed, client-modifiable value.

RectangleArgs {:#RectangleArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

Rectangle centered at (0,0).

RoundedRectangleArgs {:#RoundedRectangleArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

RoundedRectangle centered at (0,0). Legal parameter values must satisfy the constraint that the flat sides of the rectangle have non-negative length. In other words, the following constraints must hold:

  • top_left_radius + top_right_radius <= width
  • bottom_left_radius + bottom_right_radius <= width
  • top_left_radius + bottom_left_radius <= height
  • top_right_radius + bottom_right_radius <= height

CircleArgs {:#CircleArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

MeshArgs {:#MeshArgs}

Defined in fuchsia.ui.gfx/shapes.fidl

A Mesh cannot be rendered until it has been bound to vertex/index buffers; see BindMeshBuffersCmd.

ImportToken {:#ImportToken}

Defined in fuchsia.ui.gfx/tokens.fidl

Token that uniquely identifies an attachment point for a subgraph in the global scene graph. Each ImportToken has exactly one corresponding ExportToken.

A Scenic client can reference contents from another client by creating a typed resource using this token. The other client must also create a correspondingly typed resource using the corresponding ExportToken.

The exact nature of the inter-client reference depends on the specific resources created from the tokens. For example, creating a ViewHolder resource from this token allows a client to embed another client's View.

ExportToken {:#ExportToken}

Defined in fuchsia.ui.gfx/tokens.fidl

Token that uniquely identifies a root point for a subgraph in the global scene graph. Each ExportToken has exactly one corresponding ImportToken.

A Scenic client can have its contents referenced from another client by creating a typed resource using this token. The other client must also create a correspondingly typed resource using the corresponding ImportToken.

The exact nature of the inter-client reference depends on the specific resources created from the tokens. For example, creating a View resource from this token allows everything attached to the View to be embedded in another clients ViewHolder.

vec2 {:#vec2}

Defined in fuchsia.ui.gfx/types.fidl

vec3 {:#vec3}

Defined in fuchsia.ui.gfx/types.fidl

vec4 {:#vec4}

Defined in fuchsia.ui.gfx/types.fidl

mat4 {:#mat4}

Defined in fuchsia.ui.gfx/types.fidl

ColorRgba {:#ColorRgba}

Defined in fuchsia.ui.gfx/types.fidl

ColorRgb {:#ColorRgb}

Defined in fuchsia.ui.gfx/types.fidl

Quaternion {:#Quaternion}

Defined in fuchsia.ui.gfx/types.fidl

Plane3 {:#Plane3}

Defined in fuchsia.ui.gfx/types.fidl

Oriented plane described by a normal vector and a distance from the origin along that vector.

FactoredTransform {:#FactoredTransform}

Defined in fuchsia.ui.gfx/types.fidl

FloatValue {:#FloatValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a float32, and value is ignored.

Vector2Value {:#Vector2Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec2, and value is ignored.

Vector3Value {:#Vector3Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec3, and value is ignored.

Vector4Value {:#Vector4Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec4, and value is ignored.

Matrix4Value {:#Matrix4Value}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a vec4, and value is ignored.

ColorRgbValue {:#ColorRgbValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a ColorRgb, and value is ignored.

ColorRgbaValue {:#ColorRgbaValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a ColorRgba, and value is ignored.

QuaternionValue {:#QuaternionValue}

Defined in fuchsia.ui.gfx/types.fidl

A value that is specified explicitly by value if variable_id is zero, or is the value produced by the resource identified by variable_id, e.g. an animation or expression. In the latter case, the value produced by the resource must be a Quaternion, and value is ignored.

Metrics {:#Metrics}

Defined in fuchsia.ui.gfx/types.fidl

Rendering target metrics associated with a node. See also MetricsEvent.

This scale factors change in relation to the resolution of the rendering target and the scale transformations applied by containing nodes. They are always strictly positive and non-zero.

For example, suppose the rendering target is a high resolution display with a device pixel ratio of 2.0 meaning that each logical pixel within the model corresponds to two physical pixels of the display. Assuming no scale transformations affect the node, then its metrics event will report a scale factor of 2.0.

Building on this example, if instead the node‘s parent applies a scale transformation of 0.25 to the node, then the node’s metrics event will report a scale factor of 0.5 indicating that the node should render its content at a reduced resolution and level of detail since a smaller area of physical pixels (half the size in each dimension) will be rendered.

BoundingBox {:#BoundingBox}

Defined in fuchsia.ui.gfx/types.fidl

Represents an axis-aligned bounding box. If any of the dimensions has a negative extent (e.g. max.x < min.x) then the bounding box is treated as empty.

ViewProperties {:#ViewProperties}

Defined in fuchsia.ui.gfx/types.fidl

Represents the properties for a View.

ViewState {:#ViewState}

Defined in fuchsia.ui.gfx/types.fidl

Represents the state of a View in Scenic.

ENUMS

MeshIndexFormat {:#MeshIndexFormat}

Type: uint32

Defined in fuchsia.ui.gfx/commands.fidl

Set a mesh's indices and vertices.

mesh_id refs the Mesh to be updated. index_buffer_id refs a Buffer that contains the mesh indices. index_format defines how the index buffer data is to be interpreted. index_offset number of bytes from the start of the index Buffer. index_count number of indices. vertex_buffer_id refs a Buffer that contains the mesh vertices. vertex_format defines how the vertex buffer data is to be interpreted. vertex_offset number of bytes from the start of the vertex Buffer. vertex_count number of vertices. bounding_box must contain all vertices within the specified range.

The MeshVertexFormat defines which per-vertex attributes are provided by the mesh, and the size of each attribute (and therefore the size of each vertex). The attributes are ordered within the vertex in the same order that they appear within the MeshVertexFormat struct. For example, if the values are kVector3, kNone and kVector2, then:

  • each vertex has a position and UV-coordinates, but no surface normal.
  • the 3D position occupies bytes 0-11 (3 dimensions * 4 bytes per float32).
  • the UV coords occupy bytes 12-19, since no surface normal is provided.

ShadowTechnique {:#ShadowTechnique}

Type: uint32

Defined in fuchsia.ui.gfx/renderer.fidl

Represents the shadow algorithm that the Renderer should use when lighting the scene.

RenderFrequency {:#RenderFrequency}

Type: uint32

Defined in fuchsia.ui.gfx/renderer.fidl

ImportSpec {:#ImportSpec}

Type: uint32

Defined in fuchsia.ui.gfx/resources.fidl

Describes an exported resource that is to be imported by an ImportResourceCmd.

NOTE: Currently just an enum of importable resource types, but may later be expanded to express concepts like “meshes with a particular vertex format”.

ValueType {:#ValueType}

Type: uint32

Defined in fuchsia.ui.gfx/types.fidl

HitTestBehavior {:#HitTestBehavior}

Type: uint32

Defined in fuchsia.ui.gfx/types.fidl

Describes how nodes interact with hit testings.

MeshIndexFormat {:#MeshIndexFormat}

Type: uint32

Defined in fuchsia.ui.gfx/commands.fidl

Set a mesh's indices and vertices.

mesh_id refs the Mesh to be updated. index_buffer_id refs a Buffer that contains the mesh indices. index_format defines how the index buffer data is to be interpreted. index_offset number of bytes from the start of the index Buffer. index_count number of indices. vertex_buffer_id refs a Buffer that contains the mesh vertices. vertex_format defines how the vertex buffer data is to be interpreted. vertex_offset number of bytes from the start of the vertex Buffer. vertex_count number of vertices. bounding_box must contain all vertices within the specified range.

The MeshVertexFormat defines which per-vertex attributes are provided by the mesh, and the size of each attribute (and therefore the size of each vertex). The attributes are ordered within the vertex in the same order that they appear within the MeshVertexFormat struct. For example, if the values are kVector3, kNone and kVector2, then:

  • each vertex has a position and UV-coordinates, but no surface normal.
  • the 3D position occupies bytes 0-11 (3 dimensions * 4 bytes per float32).
  • the UV coords occupy bytes 12-19, since no surface normal is provided.

ShadowTechnique {:#ShadowTechnique}

Type: uint32

Defined in fuchsia.ui.gfx/renderer.fidl

Represents the shadow algorithm that the Renderer should use when lighting the scene.

RenderFrequency {:#RenderFrequency}

Type: uint32

Defined in fuchsia.ui.gfx/renderer.fidl

ImportSpec {:#ImportSpec}

Type: uint32

Defined in fuchsia.ui.gfx/resources.fidl

Describes an exported resource that is to be imported by an ImportResourceCmd.

NOTE: Currently just an enum of importable resource types, but may later be expanded to express concepts like “meshes with a particular vertex format”.

ValueType {:#ValueType}

Type: uint32

Defined in fuchsia.ui.gfx/types.fidl

HitTestBehavior {:#HitTestBehavior}

Type: uint32

Defined in fuchsia.ui.gfx/types.fidl

Describes how nodes interact with hit testings.

UNIONS

Command {:#Command}

Defined in fuchsia.ui.gfx/commands.fidl

Commands that are used to modify the state of a Session.

Event {:#Event}

Defined in fuchsia.ui.gfx/events.fidl

These are all of the types of events which can be reported by a Session. Use SetEventMaskCmd to enable event delivery for a resource.

RendererParam {:#RendererParam}

Defined in fuchsia.ui.gfx/renderer.fidl

These are all of the types of parameters that can be set to configure a Renderer.

ResourceArgs {:#ResourceArgs}

Defined in fuchsia.ui.gfx/resources.fidl

These are all of the types of resources that can be created within a Session. Add new fields only to the bottom of the list.

Value {:#Value}

Defined in fuchsia.ui.gfx/types.fidl

Command {:#Command}

Defined in fuchsia.ui.gfx/commands.fidl

Commands that are used to modify the state of a Session.

Event {:#Event}

Defined in fuchsia.ui.gfx/events.fidl

These are all of the types of events which can be reported by a Session. Use SetEventMaskCmd to enable event delivery for a resource.

RendererParam {:#RendererParam}

Defined in fuchsia.ui.gfx/renderer.fidl

These are all of the types of parameters that can be set to configure a Renderer.

ResourceArgs {:#ResourceArgs}

Defined in fuchsia.ui.gfx/resources.fidl

These are all of the types of resources that can be created within a Session. Add new fields only to the bottom of the list.

Value {:#Value}

Defined in fuchsia.ui.gfx/types.fidl

CONSTANTS