[poppler] 2 commits - poppler/SplashOutputDev.cc poppler/TextOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Sep 11 15:14:05 PDT 2012
poppler/SplashOutputDev.cc | 7 +++++--
poppler/TextOutputDev.cc | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit cb93d51ccb6b1f6938946ae5d38fb9817005fd7a
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Sep 12 00:12:07 2012 +0200
Make gcc happy
It is stupid and can't see that we only use them when we init them and complains
they might be used un-initialized
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 1c1a348..452a5ac 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -277,6 +277,7 @@ void TextWord::addChar(GfxState *state, TextFontInfo *fontA, double x, double y,
CharCode c, Unicode u) {
GfxFont *gfxFont;
double ascent, descent;
+ ascent = descent = 0; // make gcc happy
if (len == size) {
size += 16;
commit 3349a8dd7e0469cc5b5aaa8dd929c6078183ef86
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date: Wed Sep 12 00:04:45 2012 +0200
Splash: Avoid bogus memory error for tilingPattern
just return gFalse if the resulting
tiling pattern bitmap reaches a memory limit and so the Gfx implemention of
tiling patterns will be used. I think that this is an acceptable approach also
concerning performance, because it would take also a while to paint such a huge
bitmap and then draw it to splash.
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 05e9dea..a915f68 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -4084,6 +4084,7 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *ca
Matrix m1;
double *ctm, savedCTM[6];
double kx, ky, sx, sy;
+ GBool retValue = gFalse;
width = bbox[2] - bbox[0];
height = bbox[3] - bbox[1];
@@ -4143,6 +4144,8 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *ca
repeatX = x1 - x0;
repeatY = y1 - y0;
} else {
+ if ((unsigned long) result_width * result_height > 0x800000L)
+ return gFalse;
while(fabs(kx) > 16384 || fabs(ky) > 16384) {
// limit pattern bitmap size
m1.m[0] /= 2;
@@ -4230,10 +4233,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *ca
matc[1] = ctm[1];
matc[2] = ctm[2];
matc[3] = ctm[3];
- splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gTrue);
+ retValue = splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gTrue) == splashOk;
delete tBitmap;
delete gfx;
- return gTrue;
+ return retValue;
}
GBool SplashOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading)
More information about the poppler
mailing list