mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
wlr_scene: Skip direct scanout if there is no damage
This commit is contained in:
parent
774d2c82f0
commit
9ac94516b8
1 changed files with 5 additions and 6 deletions
|
@ -1558,6 +1558,11 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) {
|
|||
struct wlr_renderer *renderer = output->renderer;
|
||||
assert(renderer != NULL);
|
||||
|
||||
if (!output->needs_frame && !pixman_region32_not_empty(
|
||||
&scene_output->damage_ring.current)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
struct render_list_constructor_data list_con = {
|
||||
.box = { .x = scene_output->x, .y = scene_output->y },
|
||||
.render_list = &scene_output->render_list,
|
||||
|
@ -1672,12 +1677,6 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) {
|
|||
pixman_region32_init(&damage);
|
||||
wlr_damage_ring_get_buffer_damage(&scene_output->damage_ring,
|
||||
buffer_age, &damage);
|
||||
if (!output->needs_frame && !pixman_region32_not_empty(
|
||||
&scene_output->damage_ring.current)) {
|
||||
pixman_region32_fini(&damage);
|
||||
wlr_output_rollback(output);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!wlr_renderer_begin(renderer, output->width, output->height)) {
|
||||
pixman_region32_fini(&damage);
|
||||
|
|
Loading…
Reference in a new issue