renderer: switch to a more high-level API
Remove clear
, scissor
. Replace other functions with something like:
struct wlr_render_texture_options {
const struct wlr_fbox *src_box;
const struct wlr_box *dst_box;
float alpha;
pixman_region32_t *clip;
};
void wlr_render_texture(struct wlr_renderer *r, struct wlr_texture *texture,
const struct wlr_render_texture_options *options);
struct wlr_render_rect_options {
pixman_region32_t *clip;
};
void wlr_render_rect(struct wlr_renderer *r, const struct wlr_box *box,
const float color[static 4], const struct wlr_render_rect_options *options);
This would help with #2930 (closed) and #2644.