1
0
Fork 0
forked from wry/wry
wry/src/drm_feedback.rs

17 lines
488 B
Rust

pub use jay_drm_feedback::*;
use crate::{gfx_api::GfxContext, video::Modifier};
impl DrmFeedbackContext for dyn GfxContext + '_ {
fn main_device(&self) -> Option<uapi::c::dev_t> {
self.allocator().drm().map(|drm| drm.dev())
}
fn for_each_read_format(&self, f: &mut dyn FnMut(u32, Modifier)) {
for (format, info) in &**self.formats() {
for modifier in &info.read_modifiers {
f(*format, *modifier);
}
}
}
}