-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cosmic-screencopy-v2 based on current ext-screencopy proposal #24
Conversation
At some point we'll also want to switch this to make use of |
6d5cb8f
to
bf41b27
Compare
Added a commit with cosmic-client-toolkit helpers for this. Which is used in pop-os/xdg-desktop-portal-cosmic#31. The separate object for individual frames does seem a bit cleaner, and this implementation is more complete than the one that was previously here for v1. (But still missing handling for cursor sessions.) Still needs to be implemented in cosmic-workspaces. And hopefully some of the logic that both xdg-desktop-portal-cosmic and cosmic-workspaces duplicate could be moved into cosmic-client-toolkit. |
pub struct Frame { | ||
pub transform: WEnum<Transform>, | ||
pub damage: Vec<Rect>, | ||
// XXX monotonic? Is this used elsewhere in wayland? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically the same as presentation time protocol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right. So that's using Into<Duration>
? Then we don't have a better type than Duration
currently to represent this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In smithay this is using our own Clock
- and Time
-types from the utils
module. Which happens to convert from a Duration
. And no I don't think we have a better type in std.
pub fn capture<D, U: ScreencopyFrameDataExt + Send + Sync + 'static>( | ||
session: &zcosmic_screencopy_session_v2::ZcosmicScreencopySessionV2, | ||
buffer: &wl_buffer::WlBuffer, | ||
buffer_damage: &[Rect], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe lets name that "additional_damage"? Or something? Normally you don't want to set anything here.
bf41b27
to
8856ff2
Compare
(Also drops export-dmabuf.)
Draft until implemented everywhere