[poppler] 2 commits - poppler/GlobalParams.cc poppler/GlobalParams.h poppler/PSOutputDev.cc poppler/PSOutputDev.h

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Jan 18 04:39:40 PST 2015


 poppler/GlobalParams.cc |   16 ----------------
 poppler/GlobalParams.h  |    4 ----
 poppler/PSOutputDev.cc  |    9 +++++----
 poppler/PSOutputDev.h   |    2 ++
 4 files changed, 7 insertions(+), 24 deletions(-)

New commits:
commit 54908f675eda96c363528198e8c530921df2f45a
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Jan 18 13:34:45 2015 +0100

    Move psUncompressPreloadedImages from GlobalParams to PSOutputDev
    
    It belongs there and PSOutputDev is always created by the external user
    so in case someone wants to set it, it is the same amount of work
    to set it in GlobalParams than in PSOutputDev

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index b73ebb6..c39c725 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -606,7 +606,6 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
   psOPI = gFalse;
   psASCIIHex = gFalse;
   psBinary = gFalse;
-  psUncompressPreloadedImages = gFalse;
   psRasterResolution = 300;
   psRasterMono = gFalse;
   textEncoding = new GooString("UTF-8");
@@ -1626,15 +1625,6 @@ GBool GlobalParams::getPSBinary() {
   return binary;
 }
 
-GBool GlobalParams::getPSUncompressPreloadedImages() {
-  GBool ah;
-
-  lockGlobalParams;
-  ah = psUncompressPreloadedImages;
-  unlockGlobalParams;
-  return ah;
-}
-
 double GlobalParams::getPSRasterResolution() {
   double res;
 
@@ -1997,12 +1987,6 @@ void GlobalParams::setPSBinary(GBool binary) {
   unlockGlobalParams;
 }
 
-void GlobalParams::setPSUncompressPreloadedImages(GBool uncomp) {
-  lockGlobalParams;
-  psUncompressPreloadedImages = uncomp;
-  unlockGlobalParams;
-}
-
 void GlobalParams::setPSRasterResolution(double res) {
   lockGlobalParams;
   psRasterResolution = res;
diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index 36d88d0..6ee258f 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -175,7 +175,6 @@ public:
   GBool getPSOPI();
   GBool getPSASCIIHex();
   GBool getPSBinary();
-  GBool getPSUncompressPreloadedImages();
   double getPSRasterResolution();
   GBool getPSRasterMono();
   GooString *getTextEncodingName();
@@ -225,7 +224,6 @@ public:
   void setPSOPI(GBool opi);
   void setPSASCIIHex(GBool hex);
   void setPSBinary(GBool binary);
-  void setPSUncompressPreloadedImages(GBool uncomp);
   void setPSRasterResolution(double res);
   void setPSRasterMono(GBool mono);
   void setTextEncoding(char *encodingName);
@@ -323,7 +321,6 @@ private:
   GBool psOPI;			// generate PostScript OPI comments?
   GBool psASCIIHex;		// use ASCIIHex instead of ASCII85?
   GBool psBinary;		// use binary instead of hex
-  GBool psUncompressPreloadedImages;  // uncompress all preloaded images
   double psRasterResolution;	// PostScript rasterization resolution (dpi)
   GBool psRasterMono;		// true to do PostScript rasterization
 				//   in monochrome (gray); false to do it
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index b13476e..8f29a31 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1230,6 +1230,7 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
   }
 
   // initialize
+  uncompressPreloadedImages = gFalse;
   rasterAntialias = gFalse;
   displayText = gTrue;
   ok = gTrue;
@@ -2879,7 +2880,7 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
     useCompressed = gFalse;
     useASCIIHex = gTrue;
   } else {
-    if (globalParams->getPSUncompressPreloadedImages()) {
+    if (uncompressPreloadedImages) {
       useRLE = gFalse;
       useCompressed = gFalse;
     } else {
@@ -5834,7 +5835,7 @@ void PSOutputDev::doImageL2(Object *ref, GfxImageColorMap *colorMap,
 
   // filters
   if ((mode == psModeForm || inType3Char || preload) &&
-      globalParams->getPSUncompressPreloadedImages()) {
+      uncompressPreloadedImages) {
     s = NULL;
     useRLE = gFalse;
     useCompressed = gFalse;
@@ -6007,7 +6008,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap,
 
     // mask data source
     if ((mode == psModeForm || inType3Char || preload) &&
-      globalParams->getPSUncompressPreloadedImages()) {
+      uncompressPreloadedImages) {
       s = NULL;
       maskUseRLE = gFalse;
       maskUseCompressed = gFalse;
@@ -6216,7 +6217,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap,
 
   // filters
   if ((mode == psModeForm || inType3Char || preload) &&
-      globalParams->getPSUncompressPreloadedImages()) {
+      uncompressPreloadedImages) {
     s = NULL;
     useRLE = gFalse;
     useCompressed = gFalse;
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index 7f80899..500ad51 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -309,6 +309,7 @@ public:
   void setDisplayText(GBool display) { displayText = display; }
 
   void setRasterAntialias(GBool a) { rasterAntialias = a; }
+  void setUncompressPreloadedImages(GBool b) { uncompressPreloadedImages = b; }
 
 private:
 
@@ -491,6 +492,7 @@ private:
   GBool forceRasterize;		// forces the page to be rasterized into a image before printing
   GBool displayText;		// displayText
   GBool rasterAntialias;	// antialias on rasterize
+  GBool uncompressPreloadedImages;
 
 #if OPI_SUPPORT
   int opi13Nest;		// nesting level of OPI 1.3 objects
commit 136d7aa5e79f153dfcb216c58598e33a8ff16630
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Jan 18 13:28:26 2015 +0100

    Remove declared but not defined function

diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index f670641..36d88d0 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -197,7 +197,6 @@ public:
   GBool getPrintCommands();
   GBool getProfileCommands();
   GBool getErrQuiet();
-  double getSplashResolution();
 
   CharCodeToUnicode *getCIDToUnicode(GooString *collection);
   CharCodeToUnicode *getUnicodeToUnicode(GooString *fontName);


More information about the poppler mailing list