# fuchsia.scenic.scheduling

<br />

Added: 7

## **STRUCTS**

### FramePresentedInfo

*Defined in [fuchsia.scenic.scheduling/prediction_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.scenic.scheduling/prediction_info.fidl;l=55)*

| Field | Type | Description | Default |
|---|---|---|---|
| `actual_presentation_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` | The time the frame was presented to the user. This value was captured after the fact, differentiating it from the `presentation_time`s included in `FuturePresentationTimes`. | No default |
| `presentation_infos` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.scenic.scheduling#PresentReceivedInfo>:32` | The presentation informations for each Present2() that comprised the content of this frame. These are ordered by present submission order. | No default |
| `num_presents_allowed` | `uint64` | The number of times remaining that the client can call `Present2`. | No default |

### FuturePresentationTimes

*Defined in [fuchsia.scenic.scheduling/prediction_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.scenic.scheduling/prediction_info.fidl;l=37)*

The data type returned in `fuchsia.ui.scenic::RequestPresentationTimes`. See
that method description for more information.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `future_presentations` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.scenic.scheduling#PresentationInfo>:8` | The future estimated presentation times. They represent the times Scenic intends to let the client's work be presented over the next few frames. These values may change after they are queried. Clients who wish to minimize latency should use these values to schedule their work accordingly. | No default |
| `remaining_presents_in_flight_allowed` | `int64` | The amount of Present() calls the client is currently allowed. If the client calls Present() when this number is zero, the session will be shut down. This value is decremented every Present() call, and is incremented every OnFramePresented() event. | No default |

## **TABLES**

### PresentReceivedInfo

*Defined in [fuchsia.scenic.scheduling/prediction_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.scenic.scheduling/prediction_info.fidl;l=26)*

The times we record for each Present2, expressed in nanoseconds in the
`CLOCK_MONOTONIC` timebase.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `present_received_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` | The time Scenic receives the Present2 call. |
| ### 2 | `latched_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` | The time Scenic latched the Present2 call to. This is guaranteed to be greater than the `present_received_time`. |

### PresentationInfo

*Defined in [fuchsia.scenic.scheduling/prediction_info.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.scenic.scheduling/prediction_info.fidl;l=11)*

The times we predict for a future presentation, expressed in nanoseconds in
the `CLOCK_MONOTONIC` timebase.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `latch_point` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` | The time where Scenic processes all pending updates to its scene graph and render a new frame. Clients should aim to have all commands sent and acquire fences reached in order to have their content be presented at the corresponding `presentation_time`. The `latch_point` is guaranteed to be less than `presentation_time`. |
| ### 2 | `presentation_time` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Time` | The time in which the enqueued operations submitted before `latch_point` take visible effect. This time is usually but not necessarily vsync. |