mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-11 04:28:02 -05:00
render: add support for clearing render passes
introduces a new `wlr_render_pass_clear` function, allowing render passes to be cleared with a solid color.
This commit is contained in:
parent
7cb4e30bfd
commit
eeecb382cc
8 changed files with 120 additions and 8 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
void wlr_render_pass_init(struct wlr_render_pass *render_pass,
|
||||
const struct wlr_render_pass_impl *impl) {
|
||||
assert(impl->submit && impl->add_texture && impl->add_rect);
|
||||
assert(impl->submit && impl->add_texture && impl->add_rect && impl->clear);
|
||||
*render_pass = (struct wlr_render_pass){
|
||||
.impl = impl,
|
||||
};
|
||||
|
|
@ -34,6 +34,11 @@ void wlr_render_pass_add_rect(struct wlr_render_pass *render_pass,
|
|||
render_pass->impl->add_rect(render_pass, options);
|
||||
}
|
||||
|
||||
void wlr_render_pass_clear(struct wlr_render_pass *render_pass,
|
||||
const struct wlr_render_clear_options *options) {
|
||||
render_pass->impl->clear(render_pass, options);
|
||||
}
|
||||
|
||||
void wlr_render_texture_options_get_src_box(const struct wlr_render_texture_options *options,
|
||||
struct wlr_fbox *box) {
|
||||
*box = options->src_box;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue