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
@@ -778,6 +778,15 @@ impl Execution {
|
||||
/// Paint actual shipped boxes using their captured device state. No
|
||||
/// pagination or application of the job's final device settings.
|
||||
pub fn shipout_display_lists(&self) -> Result<Vec<crate::render::DisplayList>, Error> {
|
||||
self.shipout_display_lists_with(NativeShipout::display_list)
|
||||
}
|
||||
|
||||
/// Lower shipped boxes, optionally reusing their immutable local layout.
|
||||
/// The current revision still resolves all deferred and document-wide PDF data.
|
||||
pub fn shipout_display_lists_with(
|
||||
&self,
|
||||
mut lower: impl FnMut(&NativeShipout) -> Result<crate::render::DisplayList, String>,
|
||||
) -> Result<Vec<crate::render::DisplayList>, Error> {
|
||||
if self.native_page.is_none() {
|
||||
return Err(Error::at(
|
||||
&self.sources,
|
||||
@@ -803,7 +812,7 @@ impl Execution {
|
||||
});
|
||||
}
|
||||
if let Event::Shipout(b) = e {
|
||||
pages.push(b.display_list().map_err(|message| {
|
||||
pages.push(lower(b).map_err(|message| {
|
||||
Error::at(
|
||||
&self.sources,
|
||||
self.state.input_profile(),
|
||||
|
||||
Reference in new issue
Block a user