Abandon screenshot requests whose output is never redrawn
This commit is contained in:
1 parent
b3de13e27e
commit
38673e41c8
4 files changed
+183
-4
No files matched your search
@@ -136,6 +136,15 @@ impl PendingScreencopy {
|
||||
pub(crate) fn fail(&self) {
|
||||
self.sink.fail();
|
||||
}
|
||||
|
||||
// The compositor-owned request this readback belongs to, if any. Used to
|
||||
// drop readbacks whose request was already abandoned.
|
||||
pub(crate) fn request_id(&self) -> Option<u64> {
|
||||
match &self.sink {
|
||||
CaptureSink::Shm { .. } => None,
|
||||
CaptureSink::Owned { request, .. } => Some(*request),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn capture_allowed() -> bool {
|
||||
|
||||
Reference in new issue
Block a user