[poppler] 2 commits - poppler/CairoOutputDev.cc poppler/CairoOutputDev.h poppler/Gfx.cc poppler/OutputDev.h poppler/PreScanOutputDev.cc poppler/PreScanOutputDev.h poppler/PSOutputDev.cc poppler/PSOutputDev.h poppler/SplashOutputDev.cc poppler/SplashOutputDev.h utils/ImageOutputDev.cc utils/ImageOutputDev.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 8 08:58:32 UTC 2021


 poppler/CairoOutputDev.cc   |   10 +++++++---
 poppler/CairoOutputDev.h    |   11 +++--------
 poppler/Gfx.cc              |    3 +--
 poppler/OutputDev.h         |    5 ++---
 poppler/PSOutputDev.cc      |   37 ++++++++++++++++++++++++++++++-------
 poppler/PSOutputDev.h       |    6 +++---
 poppler/PreScanOutputDev.cc |    9 ++++-----
 poppler/PreScanOutputDev.h  |    5 ++---
 poppler/SplashOutputDev.cc  |   11 +++++++----
 poppler/SplashOutputDev.h   |    5 ++---
 utils/ImageOutputDev.cc     |    5 ++---
 utils/ImageOutputDev.h      |    5 ++---
 12 files changed, 65 insertions(+), 47 deletions(-)

New commits:
commit c72a1c31b40322f660b6529e2dab077d3bf7b79b
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Feb 7 23:47:52 2021 +0100

    PSOutputDev: Fix stack overflow in broken files
    
    oss-fuzz/29909

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 695f1c1e..bb50080a 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -4447,6 +4447,18 @@ bool PSOutputDev::tilingPatternFillL2(GfxState *state, Catalog *cat, Object *str
 
 bool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
 {
+    std::set<int>::iterator patternRefIt;
+    const int patternRefNum = tPat->getPatternRefNum();
+    if (patternRefNum != -1) {
+        if (patternsBeingTiled.find(patternRefNum) == patternsBeingTiled.end()) {
+            patternRefIt = patternsBeingTiled.insert(patternRefNum).first;
+        } else {
+            // pretend we drew it anyway
+            error(errSyntaxError, -1, "Loop in pattern fills");
+            return true;
+        }
+    }
+
     const double *bbox = tPat->getBBox();
     const double *pmat = tPat->getMatrix();
     const int paintType = tPat->getPaintType();
@@ -4454,6 +4466,7 @@ bool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, Gf
     Dict *resDict = tPat->getResDict();
     Object *str = tPat->getContentStream();
 
+    bool res;
     if (x1 - x0 == 1 && y1 - y0 == 1) {
         // Don't need to use patterns if only one instance of the pattern is used
         PDFRectangle box;
@@ -4473,14 +4486,18 @@ bool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, Gf
         gfx->display(str);
         inType3Char = false;
         delete gfx;
-        return true;
+        res = true;
+    } else if (level == psLevel1 || level == psLevel1Sep) {
+        res = tilingPatternFillL1(state, cat, str, pmat, paintType, tilingType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
+    } else {
+        res = tilingPatternFillL2(state, cat, str, pmat, paintType, tilingType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
     }
 
-    if (level == psLevel1 || level == psLevel1Sep) {
-        return tilingPatternFillL1(state, cat, str, pmat, paintType, tilingType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
-    } else {
-        return tilingPatternFillL2(state, cat, str, pmat, paintType, tilingType, resDict, mat, bbox, x0, y0, x1, y1, xStep, yStep);
+    if (patternRefNum != -1) {
+        patternsBeingTiled.erase(patternRefIt);
     }
+
+    return res;
 }
 
 bool PSOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading)
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index 5c320914..9acaee91 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -536,6 +536,7 @@ private:
 #endif
 
     bool ok; // set up ok?
+    std::set<int> patternsBeingTiled; // the patterns that are being tiled
 
     friend class WinPDFPrinter;
 };
commit 2589f3252fe304bd52be2a9322915c5397be4b09
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Feb 7 23:37:56 2021 +0100

    OutputDev:tilingPatternFill pass the GfxTilingPattern
    
    instead of lots of fields from it
    
    Makes the signature simpler :)

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index c3e29f38..aa68c6cd 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -16,7 +16,7 @@
 //
 // Copyright (C) 2005-2008 Jeff Muizelaar <jeff at infidigm.net>
 // Copyright (C) 2005, 2006 Kristian Høgsberg <krh at redhat.com>
-// Copyright (C) 2005, 2009, 2012, 2017-2020 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005, 2009, 2012, 2017-2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev at yandex.ru>
 // Copyright (C) 2006-2011, 2013, 2014, 2017, 2018 Carlos Garcia Campos <carlosgc at gnome.org>
 // Copyright (C) 2008 Carl Worth <cworth at cworth.org>
@@ -885,8 +885,7 @@ void CairoOutputDev::eoFill(GfxState *state)
     }
 }
 
-bool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, Object *str, const double *pmat, int paintType, int /*tilingType*/, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1,
-                                       double xStep, double yStep)
+bool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
 {
     PDFRectangle box;
     Gfx *gfx;
@@ -902,6 +901,11 @@ bool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat,
     StrokePathClip *strokePathTmp;
     bool adjusted_stroke_width_tmp;
     cairo_pattern_t *maskTmp;
+    const double *bbox = tPat->getBBox();
+    const double *pmat = tPat->getMatrix();
+    const int paintType = tPat->getPaintType();
+    Dict *resDict = tPat->getResDict();
+    Object *str = tPat->getContentStream();
 
     width = bbox[2] - bbox[0];
     height = bbox[3] - bbox[1];
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index 87e1dc55..dc101e22 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -23,7 +23,7 @@
 // Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2015 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
 // Copyright (C) 2016 Jason Crain <jason at aquaticape.us>
-// Copyright (C) 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2018, 2019, 2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
 // Copyright (C) 2020 Michal <sudolskym at gmail.com>
 //
@@ -170,8 +170,7 @@ public:
     void fill(GfxState *state) override;
     void eoFill(GfxState *state) override;
     void clipToStrokePath(GfxState *state) override;
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep,
-                           double yStep) override;
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
     bool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
 #endif
@@ -421,11 +420,7 @@ public:
     void fill(GfxState *state) override { }
     void eoFill(GfxState *state) override { }
     void clipToStrokePath(GfxState *state) override { }
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep,
-                           double yStep) override
-    {
-        return true;
-    }
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override { return true; }
     bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override { return true; }
     bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override { return true; }
 
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 34a02d53..cbdd5feb 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -2174,8 +2174,7 @@ void Gfx::doTilingPatternFill(GfxTilingPattern *tPat, bool stroke, bool eoFill,
             }
         }
         if (shouldDrawPattern) {
-            if (out->useTilingPatternFill()
-                && out->tilingPatternFill(state, this, catalog, tPat->getContentStream(), tPat->getMatrix(), tPat->getPaintType(), tPat->getTilingType(), tPat->getResDict(), m1, tPat->getBBox(), xi0, yi0, xi1, yi1, xstep, ystep)) {
+            if (out->useTilingPatternFill() && out->tilingPatternFill(state, this, catalog, tPat, m1, xi0, yi0, xi1, yi1, xstep, ystep)) {
                 // do nothing
             } else {
                 out->updatePatternOpacity(state);
diff --git a/poppler/OutputDev.h b/poppler/OutputDev.h
index 1802894b..024764a6 100644
--- a/poppler/OutputDev.h
+++ b/poppler/OutputDev.h
@@ -19,7 +19,7 @@
 // Copyright (C) 2007, 2011, 2017 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2009-2013, 2015 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2009, 2012, 2013, 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009, 2012, 2013, 2018, 2019, 2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2012 William Bader <williambader at hotmail.com>
@@ -229,8 +229,7 @@ public:
     virtual void stroke(GfxState * /*state*/) { }
     virtual void fill(GfxState * /*state*/) { }
     virtual void eoFill(GfxState * /*state*/) { }
-    virtual bool tilingPatternFill(GfxState * /*state*/, Gfx * /*gfx*/, Catalog * /*cat*/, Object * /*str*/, const double * /*pmat*/, int /*paintType*/, int /*tilingType*/, Dict * /*resDict*/, const double * /*mat*/,
-                                   const double * /*bbox*/, int /*x0*/, int /*y0*/, int /*x1*/, int /*y1*/, double /*xStep*/, double /*yStep*/)
+    virtual bool tilingPatternFill(GfxState * /*state*/, Gfx * /*gfx*/, Catalog * /*cat*/, GfxTilingPattern * /*tPat*/, const double * /*mat*/, int /*x0*/, int /*y0*/, int /*x1*/, int /*y1*/, double /*xStep*/, double /*yStep*/)
     {
         return false;
     }
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index de73c15b..695f1c1e 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -4445,9 +4445,15 @@ bool PSOutputDev::tilingPatternFillL2(GfxState *state, Catalog *cat, Object *str
     return true;
 }
 
-bool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1,
-                                    double xStep, double yStep)
+bool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
 {
+    const double *bbox = tPat->getBBox();
+    const double *pmat = tPat->getMatrix();
+    const int paintType = tPat->getPaintType();
+    const int tilingType = tPat->getTilingType();
+    Dict *resDict = tPat->getResDict();
+    Object *str = tPat->getContentStream();
+
     if (x1 - x0 == 1 && y1 - y0 == 1) {
         // Don't need to use patterns if only one instance of the pattern is used
         PDFRectangle box;
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index c51b10a1..5c320914 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2005 Martin Kretzschmar <martink at gnome.org>
 // Copyright (C) 2005 Kristian Høgsberg <krh at redhat.com>
-// Copyright (C) 2006-2008, 2012, 2013, 2015, 2017-2020 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2008, 2012, 2013, 2015, 2017-2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2007 Brad Hards <bradh at kde.org>
 // Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2009 Till Kamppeter <till.kamppeter at gmail.com>
@@ -232,8 +232,7 @@ public:
     void stroke(GfxState *state) override;
     void fill(GfxState *state) override;
     void eoFill(GfxState *state) override;
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep,
-                           double yStep) override;
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
     bool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
     bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) override;
     bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) override;
diff --git a/poppler/PreScanOutputDev.cc b/poppler/PreScanOutputDev.cc
index 478a7f23..d28da26c 100644
--- a/poppler/PreScanOutputDev.cc
+++ b/poppler/PreScanOutputDev.cc
@@ -14,7 +14,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2009 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2010, 2011, 2018-2020 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2010, 2011, 2018-2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2011, 2014 William Bader <williambader at hotmail.com>
 // Copyright (C) 2011, 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2011 Adrian Johnson <ajohnson at redneon.com>
@@ -73,15 +73,14 @@ void PreScanOutputDev::eoFill(GfxState *state)
     check(state->getFillColorSpace(), state->getFillColor(), state->getFillOpacity(), state->getBlendMode());
 }
 
-bool PreScanOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str, const double *pmat, int paintType, int /*tilingType*/, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1,
-                                         double xStep, double yStep)
+bool PreScanOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
 {
-    if (paintType == 1) {
+    if (tPat->getPaintType() == 1) {
         bool tilingNeeded = (x1 - x0 != 1 || y1 - y0 != 1);
         if (tilingNeeded) {
             inTilingPatternFill++;
         }
-        gfx->drawForm(str, resDict, mat, bbox);
+        gfx->drawForm(tPat->getContentStream(), tPat->getResDict(), mat, tPat->getBBox());
         if (tilingNeeded) {
             inTilingPatternFill--;
         }
diff --git a/poppler/PreScanOutputDev.h b/poppler/PreScanOutputDev.h
index 7e089a5d..2e0aae50 100644
--- a/poppler/PreScanOutputDev.h
+++ b/poppler/PreScanOutputDev.h
@@ -14,7 +14,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2009 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2010, 2018-2020 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2010, 2018-2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2011, 2014 William Bader <williambader at hotmail.com>
 // Copyright (C) 2011, 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2011 Adrian Johnson <ajohnson at redneon.com>
@@ -80,8 +80,7 @@ public:
     void stroke(GfxState *state) override;
     void fill(GfxState *state) override;
     void eoFill(GfxState *state) override;
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep,
-                           double yStep) override;
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
     bool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
     bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
     bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) override;
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 403c596b..3fd590b8 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2005 Takashi Iwai <tiwai at suse.de>
 // Copyright (C) 2006 Stefan Schweizer <genstef at gentoo.org>
-// Copyright (C) 2006-2020 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
 // Copyright (C) 2006 Scott Turner <scotty1024 at mac.com>
 // Copyright (C) 2007 Koji Otani <sho at bbr.jp>
@@ -4188,8 +4188,7 @@ void SplashOutputDev::setFreeTypeHinting(bool enable, bool enableSlightHintingA)
     enableSlightHinting = enableSlightHintingA;
 }
 
-bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *catalog, Object *str, const double *ptm, int paintType, int /*tilingType*/, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1,
-                                        double xStep, double yStep)
+bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *catalog, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
 {
     PDFRectangle box;
     Splash *formerSplash = splash;
@@ -4203,6 +4202,10 @@ bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
     double savedCTM[6];
     double kx, ky, sx, sy;
     bool retValue = false;
+    const double *bbox = tPat->getBBox();
+    const double *ptm = tPat->getMatrix();
+    const int paintType = tPat->getPaintType();
+    Dict *resDict = tPat->getResDict();
 
     width = bbox[2] - bbox[0];
     height = bbox[3] - bbox[1];
@@ -4362,7 +4365,7 @@ bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
         splash->setFillPattern(formerSplash->getFillPattern()->copy());
         splash->setStrokePattern(formerSplash->getStrokePattern()->copy());
     }
-    gfx->display(str);
+    gfx->display(tPat->getContentStream());
     delete splash;
     splash = formerSplash;
 
diff --git a/poppler/SplashOutputDev.h b/poppler/SplashOutputDev.h
index 1a68d1f9..f0b5028b 100644
--- a/poppler/SplashOutputDev.h
+++ b/poppler/SplashOutputDev.h
@@ -20,7 +20,7 @@
 // Copyright (C) 2011 Andreas Hartmetz <ahartmetz at gmail.com>
 // Copyright (C) 2011 Andrea Canciani <ranma42 at gmail.com>
 // Copyright (C) 2011, 2017 Adrian Johnson <ajohnson at redneon.com>
-// Copyright (C) 2012, 2015, 2018-2020 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2012, 2015, 2018-2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2015, 2016 William Bader <williambader at hotmail.com>
 // Copyright (C) 2018 Stefan Brüns <stefan.bruens at rwth-aachen.de>
 //
@@ -265,8 +265,7 @@ public:
     void stroke(GfxState *state) override;
     void fill(GfxState *state) override;
     void eoFill(GfxState *state) override;
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str, const double *ptm, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep,
-                           double yStep) override;
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
     bool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
     bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
     bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax) override;
diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc
index c438ce33..879d94ee 100644
--- a/utils/ImageOutputDev.cc
+++ b/utils/ImageOutputDev.cc
@@ -13,7 +13,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2005, 2007, 2011, 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005, 2007, 2011, 2018, 2019, 2021 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Rainer Keller <class321 at gmx.de>
 // Copyright (C) 2008 Timothy Lee <timothy.lee at siriushk.com>
 // Copyright (C) 2008 Vasile Gaburici <gaburici at cs.umd.edu>
@@ -658,8 +658,7 @@ void ImageOutputDev::writeImage(GfxState *state, Object *ref, Stream *str, int w
         embedStr->restore();
 }
 
-bool ImageOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1,
-                                       double xStep, double yStep)
+bool ImageOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep)
 {
     return true;
     // do nothing -- this avoids the potentially slow loop in Gfx.cc
diff --git a/utils/ImageOutputDev.h b/utils/ImageOutputDev.h
index a665f3f8..67b77b7b 100644
--- a/utils/ImageOutputDev.h
+++ b/utils/ImageOutputDev.h
@@ -19,7 +19,7 @@
 // Copyright (C) 2010 Jakob Voss <jakob.voss at gbv.de>
 // Copyright (C) 2012, 2013, 2017 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
-// Copyright (C) 2018, 2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2018, 2019, 2021 Albert Astals Cid <aacid at kde.org>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -117,8 +117,7 @@ public:
     bool useDrawChar() override { return false; }
 
     //----- path painting
-    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep,
-                           double yStep) override;
+    bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
 
     //----- image drawing
     void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;


More information about the poppler mailing list