1
0
Fork 0
forked from wry/wry

allocator: move buffer allocation traits into workspace crate

This commit is contained in:
kossLAN 2026-05-29 11:45:26 -04:00
parent 663cfb3ca3
commit 11940fb6a5
No known key found for this signature in database
10 changed files with 141 additions and 67 deletions

View file

@ -6,7 +6,6 @@ use {
scale::Scale,
state::State,
tree::Transform,
video::drm::DrmError,
},
indexmap::IndexMap,
std::{ops::Deref, rc::Rc},
@ -24,8 +23,6 @@ pub enum ScreenshooterError {
AllocatorError(#[from] AllocatorError),
#[error(transparent)]
RenderError(#[from] GfxError),
#[error(transparent)]
DrmError(#[from] DrmError),
#[error("Render context does not support XRGB8888")]
XRGB8888,
#[error("Render context supports no modifiers for XRGB8888 rendering")]
@ -93,7 +90,7 @@ pub fn take_screenshot(
state.color_manager.srgb_linear(),
)?;
let drm = match allocator.drm() {
Some(drm) => Some(drm.dup_render()?.fd().clone()),
Some(drm) => Some(drm.dup_render_fd()?),
_ => None,
};
Ok(Screenshot { drm, bo })