mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-10-30 07:30:46 +00:00
output: introduce wlr_output_state_set_damage()
This commit is contained in:
parent
709c9dd287
commit
ae7bad86dd
@ -573,6 +573,13 @@ void wlr_output_state_set_buffer(struct wlr_output_state *state,
|
||||
struct wlr_buffer *buffer);
|
||||
bool wlr_output_state_set_gamma_lut(struct wlr_output_state *state,
|
||||
size_t ramp_size, const uint16_t *r, const uint16_t *g, const uint16_t *b);
|
||||
/**
|
||||
* Sets the state's damage region.
|
||||
*
|
||||
* This should be called in along with wlr_output_state_set_buffer().
|
||||
*/
|
||||
void wlr_output_state_set_damage(struct wlr_output_state *state,
|
||||
const pixman_region32_t *damage);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -76,6 +76,18 @@ void wlr_output_state_set_buffer(struct wlr_output_state *state,
|
||||
state->buffer = wlr_buffer_lock(buffer);
|
||||
}
|
||||
|
||||
void wlr_output_state_set_damage(struct wlr_output_state *state,
|
||||
const pixman_region32_t *damage) {
|
||||
if (state->committed & WLR_OUTPUT_STATE_DAMAGE) {
|
||||
pixman_region32_fini(&state->damage);
|
||||
}
|
||||
|
||||
state->committed |= WLR_OUTPUT_STATE_DAMAGE;
|
||||
|
||||
pixman_region32_init(&state->damage);
|
||||
pixman_region32_copy(&state->damage, damage);
|
||||
}
|
||||
|
||||
bool wlr_output_state_set_gamma_lut(struct wlr_output_state *state,
|
||||
size_t ramp_size, const uint16_t *r, const uint16_t *g, const uint16_t *b) {
|
||||
uint16_t *gamma_lut = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user