render/color: return tranform in wlr_color_transform_ref()

This is more consistent with the rest of the wlroots APIs and is
more concise.
master
Simon Ser 3 months ago
parent a5aae69b2a
commit fa2abbeefb

@ -44,7 +44,7 @@ struct wlr_color_transform *wlr_color_transform_init_srgb(void);
/**
* Increase the reference count of the color transform by 1.
*/
void wlr_color_transform_ref(struct wlr_color_transform *tr);
struct wlr_color_transform *wlr_color_transform_ref(struct wlr_color_transform *tr);
/**
* Reduce the reference count of the color transform by 1; freeing it and

@ -20,8 +20,9 @@ static void color_transform_destroy(struct wlr_color_transform *tr) {
free(tr);
}
void wlr_color_transform_ref(struct wlr_color_transform *tr) {
struct wlr_color_transform *wlr_color_transform_ref(struct wlr_color_transform *tr) {
tr->ref_count += 1;
return tr;
}
void wlr_color_transform_unref(struct wlr_color_transform *tr) {

@ -954,8 +954,7 @@ struct wlr_vk_render_pass *vulkan_begin_render_pass(struct wlr_vk_renderer *rend
pass->renderer = renderer;
pass->srgb_pathway = using_srgb_pathway;
if (options != NULL && options->color_transform != NULL) {
wlr_color_transform_ref(options->color_transform);
pass->color_transform = options->color_transform;
pass->color_transform = wlr_color_transform_ref(options->color_transform);
}
rect_union_init(&pass->updated_region);

Loading…
Cancel
Save