poppler/CairoOutputDev.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit 52db12dd06fac5cfe9010c1f18ef719f2c6c3df2 Author: Adrian Johnson <[email protected]> Date: Sun Oct 14 07:57:34 2018 +0000 cairo: Update comment diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index 04d8cbf4..8b31df77 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -3040,7 +3040,9 @@ void CairoOutputDev::setMimeData(GfxState *state, Stream *str, Object *ref, cairo_status_t status = CAIRO_STATUS_SUCCESS; #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) - // Avoid UNIQUE_ID on PS output as it stores unique images in PS memory for re-use. + // Since 1.5.10 the cairo PS backend stores images with UNIQUE_ID in PS memory so the + // image can be re-used multiple times. As we don't know how large the images are or + // how many times they are used, there is no benefit in enabling this. Issue #106 if (cairo_surface_get_type (cairo_get_target (cairo)) != CAIRO_SURFACE_TYPE_PS) { if (ref && ref->isRef()) { status = setMimeIdFromRef(image, CAIRO_MIME_TYPE_UNIQUE_ID, commit cb307609b79187b72f5239330bf7f448d7101678 Author: Adrian Johnson <[email protected]> Date: Thu Oct 11 08:42:14 2018 +0000 cairo: Don't use UNIQUE_ID for PS output to avoid using PS memory on cairo >= 1.5.10 diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index b8a3e491..04d8cbf4 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -3040,9 +3040,12 @@ void CairoOutputDev::setMimeData(GfxState *state, Stream *str, Object *ref, cairo_status_t status = CAIRO_STATUS_SUCCESS; #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) - if (ref && ref->isRef()) { - status = setMimeIdFromRef(image, CAIRO_MIME_TYPE_UNIQUE_ID, - "poppler-surface-", ref->getRef()); + // Avoid UNIQUE_ID on PS output as it stores unique images in PS memory for re-use. + if (cairo_surface_get_type (cairo_get_target (cairo)) != CAIRO_SURFACE_TYPE_PS) { + if (ref && ref->isRef()) { + status = setMimeIdFromRef(image, CAIRO_MIME_TYPE_UNIQUE_ID, + "poppler-surface-", ref->getRef()); + } } #endif if (!status) { _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
