From ef8ab796526b8ab9abc076071edbe7e2fa6f5525 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 14 Aug 2011 22:06:22 +0930 Subject: [PATCH 2/2] ps: Avoid using /PatternType if only one instance of the pattern is used this optimization makes pages print faster on my LaserJet --- poppler/PSOutputDev.cc | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index 89cfdbc..dca8871 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -4112,6 +4112,9 @@ GBool PSOutputDev::tilingPatternFill(GfxState *state, Catalog *cat, Object *str, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) { + if (x1 - x0 == 1 && y1 - y0 == 1) + return gFalse; // Don't need to use patterns if only one instance of the pattern is used + if (level == psLevel1 || level == psLevel1Sep) { return tilingPatternFillL1(state, cat, str, pmat, paintType, tilingType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep); -- 1.7.4.1