-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Wayland screenshot is captured in src/linux/wayland_capture
:
let res = org_gnome_shell_screenshot(conn, x, y, width, height)
.or_else(|e| {
log::debug!("org_gnome_shell_screenshot failed {}", e);
org_freedesktop_portal_screenshot(conn, x, y, width, height)
})
.or_else(|e| {
log::debug!("org_freedesktop_portal_screenshot failed {}", e);
wlroots_screenshot(x, y, width, height)
});
I inserted these statements after each step:
println!("{:?}", now.elapsed());
- A: gnome_shell
- B: org_freedesktop_portal
- C: wlroots
Currently, xcap will try A, if it fails try B, if it fails try C
These are the results for the screenshot capture time:
A: 7.63007ms
B: 1.453836723s
C: 1.453845008s
Step B takes an extremely long time which completely blocks Step C
I think what xcap should do instead is use some heuristics to determine which of A, B or C to use. Such as reading env variable
If heuristics does not work, then changing the order from A -> B -> C to C -> B -> A will help
Mylloon
Metadata
Metadata
Assignees
Labels
No labels