Reuse equivalent native page layouts after execution
This commit is contained in:
1 parent
f09bb04a32
commit
79bfee5ab1
4 files changed
+45
-20
No files matched your search
+4
-5
@@ -1133,9 +1133,7 @@ impl CompileJob {
|
||||
let e = &execution.execution;
|
||||
let font_cache = &self.compiler.font_cache;
|
||||
let type1_before = font_cache.type1_work();
|
||||
let prior_layout = (entry_checkpoint_work.reused_steps > 0)
|
||||
.then(|| self.compiler.latest())
|
||||
.flatten();
|
||||
let prior_layout = checkpoints.and_then(|_| self.compiler.latest());
|
||||
let mut shipout_layout_work = ShipoutLayoutWork::default();
|
||||
let mut shipout_layouts = Vec::new();
|
||||
let (mut pages, paper_width, paper_height, origin) = if request.target
|
||||
@@ -1148,8 +1146,9 @@ impl CompileJob {
|
||||
}).zip(&prior.shipout_layouts)
|
||||
});
|
||||
let pages = e.shipout_display_lists_with(|page| {
|
||||
let shared = old.next().filter(|(prior, _)| page.shares_local_layout_with(prior));
|
||||
if let Some((_, layout)) = shared {
|
||||
if let Some((_, layout)) =
|
||||
old.next().filter(|(prior, _)| page.shares_local_layout_with(prior))
|
||||
{
|
||||
shipout_layout_work.reused_pages += 1;
|
||||
shipout_layouts.push(layout.clone());
|
||||
return Ok((**layout).clone());
|
||||
|
||||
Reference in new issue
Block a user