mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
Merge branch 'buffer-pass-clear' into 'master'
render: optionally clear buffer before rendering See merge request wlroots/wlroots!4518
This commit is contained in:
commit
229f89b416
19 changed files with 254 additions and 118 deletions
|
|
@ -91,16 +91,14 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
|
|||
struct wlr_output_state state;
|
||||
wlr_output_state_init(&state);
|
||||
struct wlr_render_pass *pass = wlr_output_begin_render_pass(output->wlr_output, &state, NULL,
|
||||
NULL);
|
||||
&(struct wlr_buffer_pass_options){
|
||||
.clear_buffer = true,
|
||||
.clear_color = { 0.3, 0.3, 0.3, 1.0 },
|
||||
});
|
||||
if (pass == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_render_pass_add_rect(pass, &(struct wlr_render_rect_options){
|
||||
.color = { 0.3, 0.3, 0.3, 1.0 },
|
||||
.box = { .width = width, .height = height },
|
||||
});
|
||||
|
||||
if (output->surface != NULL) {
|
||||
struct render_data rdata = {
|
||||
.output = output->wlr_output,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue