mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
ipc+comp: Make layer structs more consistent.
Add missing fields. Sort layer struct members. ipc/protocol: Move xdev_id and name to common layer struct.
This commit is contained in:
parent
15be0209b9
commit
08d81e5950
|
@ -87,10 +87,12 @@ struct comp_swapchain
|
|||
struct comp_layer_quad
|
||||
{
|
||||
struct comp_swapchain *sc;
|
||||
enum xrt_layer_eye_visibility visibility;
|
||||
|
||||
uint32_t image_index;
|
||||
struct xrt_rect rect;
|
||||
uint32_t array_index;
|
||||
|
||||
enum xrt_layer_eye_visibility visibility;
|
||||
struct xrt_rect rect;
|
||||
struct xrt_pose pose;
|
||||
struct xrt_vec2 size;
|
||||
};
|
||||
|
|
|
@ -368,10 +368,6 @@ ipc_compositor_layer_stereo_projection(
|
|||
struct ipc_client_swapchain *l = ipc_client_swapchain(l_sc);
|
||||
struct ipc_client_swapchain *r = ipc_client_swapchain(r_sc);
|
||||
|
||||
stereo->timestamp = timestamp;
|
||||
stereo->xdev_id = 0; //! @todo Real id.
|
||||
stereo->name = name;
|
||||
stereo->layer_flags = layer_flags;
|
||||
stereo->l.swapchain_id = l->id;
|
||||
stereo->l.image_index = l_image_index;
|
||||
stereo->l.rect = *l_rect;
|
||||
|
@ -385,8 +381,11 @@ ipc_compositor_layer_stereo_projection(
|
|||
stereo->r.fov = *r_fov;
|
||||
stereo->r.pose = *r_pose;
|
||||
|
||||
layer->xdev_id = 0; //! @todo Real id.
|
||||
layer->name = name;
|
||||
layer->timestamp = timestamp;
|
||||
layer->layer_flags = layer_flags;
|
||||
layer->flip_y = flip_y;
|
||||
|
||||
layer->type = XRT_LAYER_STEREO_PROJECTION;
|
||||
|
||||
// Increment the number of layers.
|
||||
|
@ -418,10 +417,6 @@ ipc_compositor_layer_quad(struct xrt_compositor *xc,
|
|||
struct ipc_layer_quad *quad = &layer->quad;
|
||||
struct ipc_client_swapchain *ics = ipc_client_swapchain(sc);
|
||||
|
||||
quad->timestamp = timestamp;
|
||||
quad->xdev_id = 0; //! @todo Real id.
|
||||
quad->name = name;
|
||||
quad->layer_flags = layer_flags;
|
||||
quad->swapchain_id = ics->id;
|
||||
quad->image_index = image_index;
|
||||
quad->rect = *rect;
|
||||
|
@ -429,6 +424,10 @@ ipc_compositor_layer_quad(struct xrt_compositor *xc,
|
|||
quad->pose = *pose;
|
||||
quad->size = *size;
|
||||
|
||||
layer->xdev_id = 0; //! @todo Real id.
|
||||
layer->name = name;
|
||||
layer->timestamp = timestamp;
|
||||
layer->layer_flags = layer_flags;
|
||||
layer->flip_y = flip_y;
|
||||
layer->type = XRT_LAYER_QUAD;
|
||||
|
||||
|
|
|
@ -75,18 +75,13 @@ struct ipc_shared_device
|
|||
|
||||
struct ipc_layer_stereo_projection
|
||||
{
|
||||
uint64_t timestamp;
|
||||
|
||||
uint32_t xdev_id;
|
||||
enum xrt_input_name name;
|
||||
enum xrt_layer_composition_flags layer_flags;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32_t swapchain_id;
|
||||
uint32_t image_index;
|
||||
struct xrt_rect rect;
|
||||
uint32_t array_index;
|
||||
|
||||
struct xrt_rect rect;
|
||||
struct xrt_fov fov;
|
||||
struct xrt_pose pose;
|
||||
} l, r;
|
||||
|
@ -94,22 +89,23 @@ struct ipc_layer_stereo_projection
|
|||
|
||||
struct ipc_layer_quad
|
||||
{
|
||||
uint64_t timestamp;
|
||||
|
||||
uint32_t xdev_id;
|
||||
enum xrt_input_name name;
|
||||
enum xrt_layer_composition_flags layer_flags;
|
||||
|
||||
uint32_t swapchain_id;
|
||||
|
||||
uint32_t image_index;
|
||||
struct xrt_rect rect;
|
||||
uint32_t array_index;
|
||||
|
||||
struct xrt_rect rect;
|
||||
struct xrt_pose pose;
|
||||
struct xrt_vec2 size;
|
||||
};
|
||||
|
||||
struct ipc_layer_entry
|
||||
{
|
||||
uint64_t timestamp;
|
||||
uint32_t xdev_id;
|
||||
enum xrt_input_name name;
|
||||
|
||||
enum xrt_layer_composition_flags layer_flags;
|
||||
enum xrt_layer_type type;
|
||||
bool flip_y;
|
||||
|
||||
|
|
|
@ -88,11 +88,14 @@ struct ipc_swapchain_data
|
|||
struct ipc_quad_render_state
|
||||
{
|
||||
uint32_t swapchain_index;
|
||||
|
||||
uint32_t image_index;
|
||||
uint32_t array_index;
|
||||
|
||||
enum xrt_layer_eye_visibility visibility;
|
||||
struct xrt_pose pose;
|
||||
struct xrt_vec2 size;
|
||||
struct xrt_rect rect;
|
||||
};
|
||||
|
||||
struct ipc_stereo_projection_render_state
|
||||
|
@ -107,6 +110,7 @@ struct ipc_stereo_projection_render_state
|
|||
|
||||
struct ipc_layer_render_state
|
||||
{
|
||||
enum xrt_layer_composition_flags flags;
|
||||
enum xrt_layer_type type;
|
||||
bool flip_y;
|
||||
|
||||
|
|
Loading…
Reference in a new issue