mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 00:22:25 +00:00
output: add wlr_output_state_set_layers()
This commit is contained in:
parent
73ca1ea48a
commit
670915eeea
@ -82,11 +82,9 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_output_state output_state = {
|
struct wlr_output_state output_state = {0};
|
||||||
.committed = WLR_OUTPUT_STATE_LAYERS,
|
wlr_output_state_set_layers(&output_state, layers_arr.data,
|
||||||
.layers = layers_arr.data,
|
layers_arr.size / sizeof(struct wlr_output_layer_state));
|
||||||
.layers_len = layers_arr.size / sizeof(struct wlr_output_layer_state),
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!wlr_output_test_state(output->wlr_output, &output_state)) {
|
if (!wlr_output_test_state(output->wlr_output, &output_state)) {
|
||||||
wlr_log(WLR_ERROR, "wlr_output_test() failed");
|
wlr_log(WLR_ERROR, "wlr_output_test() failed");
|
||||||
|
@ -580,6 +580,13 @@ bool wlr_output_state_set_gamma_lut(struct wlr_output_state *state,
|
|||||||
*/
|
*/
|
||||||
void wlr_output_state_set_damage(struct wlr_output_state *state,
|
void wlr_output_state_set_damage(struct wlr_output_state *state,
|
||||||
const pixman_region32_t *damage);
|
const pixman_region32_t *damage);
|
||||||
|
/**
|
||||||
|
* Set the state's layers.
|
||||||
|
*
|
||||||
|
* The array must be kept valid by the caller until wlr_output_state_finish().
|
||||||
|
*/
|
||||||
|
void wlr_output_state_set_layers(struct wlr_output_state *state,
|
||||||
|
struct wlr_output_layer_state *layers, size_t layers_len);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -478,9 +478,7 @@ void wlr_output_set_damage(struct wlr_output *output,
|
|||||||
|
|
||||||
void wlr_output_set_layers(struct wlr_output *output,
|
void wlr_output_set_layers(struct wlr_output *output,
|
||||||
struct wlr_output_layer_state *layers, size_t layers_len) {
|
struct wlr_output_layer_state *layers, size_t layers_len) {
|
||||||
output->pending.committed |= WLR_OUTPUT_STATE_LAYERS;
|
wlr_output_state_set_layers(&output->pending, layers, layers_len);
|
||||||
output->pending.layers = layers;
|
|
||||||
output->pending.layers_len = layers_len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void output_state_clear_gamma_lut(struct wlr_output_state *state) {
|
static void output_state_clear_gamma_lut(struct wlr_output_state *state) {
|
||||||
|
@ -120,3 +120,10 @@ bool wlr_output_state_set_gamma_lut(struct wlr_output_state *state,
|
|||||||
state->gamma_lut = gamma_lut;
|
state->gamma_lut = gamma_lut;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wlr_output_state_set_layers(struct wlr_output_state *state,
|
||||||
|
struct wlr_output_layer_state *layers, size_t layers_len) {
|
||||||
|
state->committed |= WLR_OUTPUT_STATE_LAYERS;
|
||||||
|
state->layers = layers;
|
||||||
|
state->layers_len = layers_len;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user