Remove RenderPass::adjust_vars

This commit is contained in:
Tad Hardesty 2019-11-16 22:18:53 -08:00
parent c8950c0ebc
commit 900177e280
2 changed files with 2 additions and 13 deletions

View file

@ -58,9 +58,6 @@ pub fn generate(ctx: Context, icon_cache: &IconCache) -> Result<Image, ()> {
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) {

View file

@ -35,12 +35,6 @@ pub trait RenderPass: Sync {
output: &mut Vec<Atom<'a>>,
) -> 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<Sprite<'a>>,
) {}
/// 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,