mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-04 04:06:09 -05:00
Merge branch 'copy-capture-damage-only' into 'master'
ext_image_copy_capture_v1: Only render scene source on damage See merge request wlroots/wlroots!5240
This commit is contained in:
commit
8c147b394c
1 changed files with 12 additions and 5 deletions
|
|
@ -95,10 +95,6 @@ static void source_render(struct scene_node_source *source) {
|
|||
// TODO: send failure
|
||||
return;
|
||||
}
|
||||
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
wlr_scene_output_send_frame_done(scene_output, &now);
|
||||
}
|
||||
|
||||
static void source_start(struct wlr_ext_image_capture_source_v1 *base, bool with_cursors) {
|
||||
|
|
@ -110,6 +106,10 @@ static void source_start(struct wlr_ext_image_capture_source_v1 *base, bool with
|
|||
}
|
||||
|
||||
source_render(source);
|
||||
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
wlr_scene_output_send_frame_done(source->scene_output, &now);
|
||||
}
|
||||
|
||||
static void source_stop(struct wlr_ext_image_capture_source_v1 *base) {
|
||||
|
|
@ -285,7 +285,14 @@ static void source_handle_output_frame(struct wl_listener *listener, void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
source_render(source);
|
||||
// We can only emit frames with damage
|
||||
if (!pixman_region32_empty(&source->scene_output->pending_commit_damage)) {
|
||||
source_render(source);
|
||||
}
|
||||
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
wlr_scene_output_send_frame_done(source->scene_output, &now);
|
||||
}
|
||||
|
||||
struct wlr_ext_image_capture_source_v1 *wlr_ext_image_capture_source_v1_create_with_scene_node(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue