From 900177e2801304e9211be674fde844288b1003c8 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Sat, 16 Nov 2019 22:18:53 -0800 Subject: [PATCH] Remove RenderPass::adjust_vars --- src/tools/minimap.rs | 3 --- src/tools/render_passes/mod.rs | 12 ++---------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/tools/minimap.rs b/src/tools/minimap.rs index 733316b5..f3a6f1af 100644 --- a/src/tools/minimap.rs +++ b/src/tools/minimap.rs @@ -58,9 +58,6 @@ pub fn generate(ctx: Context, icon_cache: &IconCache) -> Result { continue; } 'atom: for mut atom in get_atom_list(objtree, &map.dictionary[e], (x as u32, y as u32), render_passes, Some(ctx.errors)) { - for pass in render_passes { - pass.adjust_vars(&mut atom, &objtree); - } for pass in render_passes.iter() { // Note that late_filter is NOT called during smoothing lookups. if !pass.late_filter(&atom, objtree) { diff --git a/src/tools/render_passes/mod.rs b/src/tools/render_passes/mod.rs index bd5e0034..13dca14a 100644 --- a/src/tools/render_passes/mod.rs +++ b/src/tools/render_passes/mod.rs @@ -35,12 +35,6 @@ pub trait RenderPass: Sync { output: &mut Vec>, ) -> bool { false } - /// Adjust the variables of an atom. - fn adjust_vars<'a>(&self, - atom: &mut Atom<'a>, - objtree: &'a ObjectTree, - ) {} - fn adjust_sprite<'a>(&self, atom: &Atom<'a>, sprite: &mut Sprite<'a>, @@ -56,10 +50,8 @@ pub trait RenderPass: Sync { overlays: &mut Vec>, ) {} - /// Filter atoms at the end of the process. - /// - /// Will act on adjusted atoms and pseudo-atoms from `adjust_vars` and - /// `overlays`. Return `true` to keep and `false` to discard. + /// Filter atoms at the end of the process, after they have been taken into + /// account by their neighbors. fn late_filter(&self, atom: &Atom, objtree: &ObjectTree,