mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-14 14:32:57 -04:00
output: rename color_transform to post_color_transform
We'll soon introduce pre_color_transform for the pre-blending counterpart.
This commit is contained in:
parent
fd0a4dc40e
commit
03712270ef
8 changed files with 37 additions and 36 deletions
|
|
@ -252,12 +252,12 @@ static void output_apply_state(struct wlr_output *output,
|
|||
}
|
||||
}
|
||||
|
||||
if (state->committed & WLR_OUTPUT_STATE_COLOR_TRANSFORM) {
|
||||
wlr_color_transform_unref(output->color_transform);
|
||||
if (state->color_transform != NULL) {
|
||||
output->color_transform = wlr_color_transform_ref(state->color_transform);
|
||||
if (state->committed & WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM) {
|
||||
wlr_color_transform_unref(output->post_color_transform);
|
||||
if (state->post_color_transform != NULL) {
|
||||
output->post_color_transform = wlr_color_transform_ref(state->post_color_transform);
|
||||
} else {
|
||||
output->color_transform = NULL;
|
||||
output->post_color_transform = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ void wlr_output_finish(struct wlr_output *output) {
|
|||
|
||||
wlr_swapchain_destroy(output->cursor_swapchain);
|
||||
wlr_buffer_unlock(output->cursor_front_buffer);
|
||||
wlr_color_transform_unref(output->color_transform);
|
||||
wlr_color_transform_unref(output->post_color_transform);
|
||||
|
||||
wlr_swapchain_destroy(output->swapchain);
|
||||
|
||||
|
|
@ -581,9 +581,9 @@ static uint32_t output_compare_state(struct wlr_output *output,
|
|||
output->subpixel == state->subpixel) {
|
||||
fields |= WLR_OUTPUT_STATE_SUBPIXEL;
|
||||
}
|
||||
if ((state->committed & WLR_OUTPUT_STATE_COLOR_TRANSFORM) &&
|
||||
output->color_transform == state->color_transform) {
|
||||
fields |= WLR_OUTPUT_STATE_COLOR_TRANSFORM;
|
||||
if ((state->committed & WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM) &&
|
||||
output->post_color_transform == state->post_color_transform) {
|
||||
fields |= WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM;
|
||||
}
|
||||
if ((state->committed & WLR_OUTPUT_STATE_COLOR_REPRESENTATION) &&
|
||||
output->color_encoding == state->color_encoding &&
|
||||
|
|
@ -685,7 +685,7 @@ static bool output_basic_test(struct wlr_output *output,
|
|||
{ WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED, "adaptive sync" },
|
||||
{ WLR_OUTPUT_STATE_RENDER_FORMAT, "render format" },
|
||||
{ WLR_OUTPUT_STATE_SUBPIXEL, "subpixel" },
|
||||
{ WLR_OUTPUT_STATE_COLOR_TRANSFORM, "color transform" },
|
||||
{ WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM, "post color transform" },
|
||||
{ WLR_OUTPUT_STATE_IMAGE_DESCRIPTION, "image description" },
|
||||
};
|
||||
if (!enabled) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ void wlr_output_state_finish(struct wlr_output_state *state) {
|
|||
pixman_region32_fini(&state->damage);
|
||||
wlr_drm_syncobj_timeline_unref(state->wait_timeline);
|
||||
wlr_drm_syncobj_timeline_unref(state->signal_timeline);
|
||||
wlr_color_transform_unref(state->color_transform);
|
||||
wlr_color_transform_unref(state->post_color_transform);
|
||||
free(state->image_description);
|
||||
}
|
||||
|
||||
|
|
@ -113,14 +113,14 @@ void wlr_output_state_set_signal_timeline(struct wlr_output_state *state,
|
|||
state->signal_point = dst_point;
|
||||
}
|
||||
|
||||
void wlr_output_state_set_color_transform(struct wlr_output_state *state,
|
||||
void wlr_output_state_set_post_color_transform(struct wlr_output_state *state,
|
||||
struct wlr_color_transform *tr) {
|
||||
state->committed |= WLR_OUTPUT_STATE_COLOR_TRANSFORM;
|
||||
wlr_color_transform_unref(state->color_transform);
|
||||
state->committed |= WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM;
|
||||
wlr_color_transform_unref(state->post_color_transform);
|
||||
if (tr) {
|
||||
state->color_transform = wlr_color_transform_ref(tr);
|
||||
state->post_color_transform = wlr_color_transform_ref(tr);
|
||||
} else {
|
||||
state->color_transform = NULL;
|
||||
state->post_color_transform = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ bool wlr_output_state_copy(struct wlr_output_state *dst,
|
|||
WLR_OUTPUT_STATE_DAMAGE |
|
||||
WLR_OUTPUT_STATE_WAIT_TIMELINE |
|
||||
WLR_OUTPUT_STATE_SIGNAL_TIMELINE |
|
||||
WLR_OUTPUT_STATE_COLOR_TRANSFORM |
|
||||
WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM |
|
||||
WLR_OUTPUT_STATE_IMAGE_DESCRIPTION);
|
||||
copy.buffer = NULL;
|
||||
copy.buffer_src_box = (struct wlr_fbox){0};
|
||||
|
|
@ -164,7 +164,7 @@ bool wlr_output_state_copy(struct wlr_output_state *dst,
|
|||
pixman_region32_init(©.damage);
|
||||
copy.wait_timeline = NULL;
|
||||
copy.signal_timeline = NULL;
|
||||
copy.color_transform = NULL;
|
||||
copy.post_color_transform = NULL;
|
||||
copy.image_description = NULL;
|
||||
|
||||
if (src->committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||
|
|
@ -186,8 +186,8 @@ bool wlr_output_state_copy(struct wlr_output_state *dst,
|
|||
src->signal_point);
|
||||
}
|
||||
|
||||
if (src->committed & WLR_OUTPUT_STATE_COLOR_TRANSFORM) {
|
||||
wlr_output_state_set_color_transform(©, src->color_transform);
|
||||
if (src->committed & WLR_OUTPUT_STATE_POST_COLOR_TRANSFORM) {
|
||||
wlr_output_state_set_post_color_transform(©, src->post_color_transform);
|
||||
}
|
||||
if (src->committed & WLR_OUTPUT_STATE_IMAGE_DESCRIPTION) {
|
||||
if (!wlr_output_state_set_image_description(©, src->image_description)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue