1
0
Fork 0
forked from wry/wry

renderer: remove unused helper methods

This commit is contained in:
kossLAN 2026-05-29 18:30:30 -04:00
parent 864f506b1e
commit bcc85c8b1b
No known key found for this signature in database
2 changed files with 0 additions and 132 deletions

View file

@ -570,33 +570,6 @@ impl dyn GfxFramebuffer {
)
}
pub fn render_custom(
self: &Rc<Self>,
acquire_sync: AcquireSync,
release_sync: ReleaseSync,
cd: &Rc<ColorDescription>,
scale: Scale,
clear: Option<&Color>,
clear_cd: &Rc<LinearColorDescription>,
blend_buffer: Option<&Rc<dyn GfxBlendBuffer>>,
blend_cd: &Rc<ColorDescription>,
f: &mut dyn FnMut(&mut RendererBase),
) -> Result<Option<FdSync>, GfxError> {
let mut ops = vec![];
let mut renderer = self.renderer_base(&mut ops, scale, Transform::None);
f(&mut renderer);
self.render(
acquire_sync,
release_sync,
cd,
&ops,
clear,
clear_cd,
blend_buffer,
blend_cd,
)
}
pub fn create_render_pass(
&self,
node: &dyn Node,
@ -967,45 +940,6 @@ impl Debug for GfxError {
}
}
impl GfxFormat {
pub fn cross_intersect(&self, other: &GfxFormat) -> GfxFormat {
assert_eq!(self.format, other.format);
GfxFormat {
format: self.format,
read_modifiers: self
.read_modifiers
.iter()
.copied()
.filter(|m| other.write_modifiers.contains_key(m))
.collect(),
write_modifiers: self
.write_modifiers
.iter()
.map(|(m, v)| (*m, v.clone()))
.filter(|(m, _)| other.read_modifiers.contains(m))
.collect(),
supports_shm: self.supports_shm && other.supports_shm,
}
}
}
pub fn cross_intersect_formats(
local: &AHashMap<u32, GfxFormat>,
remote: &AHashMap<u32, GfxFormat>,
) -> AHashMap<u32, GfxFormat> {
let mut res = AHashMap::new();
for lf in local.values() {
if let Some(rf) = remote.get(&lf.format.drm) {
let f = lf.cross_intersect(rf);
if f.read_modifiers.is_empty() && f.write_modifiers.is_empty() {
continue;
}
res.insert(f.format.drm, f);
}
}
res
}
impl PendingShmTransfer {
pub fn new(cancel: Rc<dyn AsyncShmGfxTextureTransferCancellable>, id: u64) -> Self {
Self { cancel, id }