mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 07:06:10 +00:00
ipc: Simplify code by just copying a structure.
This commit is contained in:
parent
1881bb6357
commit
172ff0f434
|
@ -102,16 +102,8 @@ ipc_handle_compositor_layer_sync(volatile struct ipc_client_state *cs,
|
||||||
struct ipc_shared_memory *ism = cs->server->ism;
|
struct ipc_shared_memory *ism = cs->server->ism;
|
||||||
struct ipc_layer_slot *slot = &ism->slots[slot_id];
|
struct ipc_layer_slot *slot = &ism->slots[slot_id];
|
||||||
|
|
||||||
//! @todo big copy instead of this sparse copy?
|
// Copy current slot data to our state.
|
||||||
for (uint32_t i = 0; i < slot->num_layers; i++) {
|
cs->render_state = *slot;
|
||||||
struct ipc_layer_entry *sl = &slot->layers[i];
|
|
||||||
volatile struct ipc_layer_entry *rl =
|
|
||||||
&cs->render_state.layers[i];
|
|
||||||
|
|
||||||
*rl = *sl;
|
|
||||||
}
|
|
||||||
|
|
||||||
cs->render_state.num_layers = slot->num_layers;
|
|
||||||
cs->rendering_state = true;
|
cs->rendering_state = true;
|
||||||
|
|
||||||
*out_free_slot_id = (slot_id + 1) % IPC_MAX_SLOTS;
|
*out_free_slot_id = (slot_id + 1) % IPC_MAX_SLOTS;
|
||||||
|
|
Loading…
Reference in a new issue