Reuse unchanged shipout drawing lists after checkpoint resume
This commit is contained in:
1 parent
e7ab132520
commit
6939ff71ff
5 files changed
+88
-7
No files matched your search
@@ -66,6 +66,21 @@ fn pdf_resource_entries_empty(entries: &Arc<[u8]>) -> bool {
|
||||
}
|
||||
|
||||
impl NativeShipout {
|
||||
/// The checkpoint and its resumed execution share actual TeX lists.
|
||||
/// Check that identity first, then compare the rest of the shipout snapshot.
|
||||
pub fn shares_local_layout_with(&self, prior: &Self) -> bool {
|
||||
let shared = match (&self.box_node.content, &prior.box_node.content) {
|
||||
(BoxContent::Horizontal(current), BoxContent::Horizontal(previous)) => {
|
||||
Arc::ptr_eq(current, previous)
|
||||
}
|
||||
(BoxContent::Vertical(current), BoxContent::Vertical(previous)) => {
|
||||
Arc::ptr_eq(current, previous)
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
shared && self == prior
|
||||
}
|
||||
|
||||
pub fn display_list(&self) -> Result<crate::render::DisplayList, String> {
|
||||
self.display_list_prefix(None)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user