[poppler] poppler/Gfx.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Sep 21 12:35:38 PDT 2012


 poppler/Gfx.cc |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ca6afce24aac2ef9d88e215177b11760f7468a6d
Author: Lu Wang <coolwanglu at gmail.com>
Date:   Fri Sep 21 21:33:05 2012 +0200

    Do not call drawing routines if we don't need non text
    
    Bug #54617

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 4e663b4..8ee2026 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -36,6 +36,7 @@
 // Copyright (C) 2011 Axel Strübing <axel.struebing at freenet.de>
 // Copyright (C) 2012 Even Rouault <even.rouault at mines-paris.org>
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
+// Copyright (C) 2012 Lu Wang <coolwanglu at gmail.com>
 //
 // 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
@@ -4285,7 +4286,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
     obj1.free();
 
     // if drawing is disabled, skip over inline image data
-    if (!ocState) {
+    if (!ocState || !out->needNonText()) {
       str->reset();
       n = height * ((width + 7) / 8);
       for (i = 0; i < n; ++i) {
@@ -4544,7 +4545,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
     }
 
     // if drawing is disabled, skip over inline image data
-    if (!ocState) {
+    if (!ocState || !out->needNonText()) {
       str->reset();
       n = height * ((width * colorMap->getNumPixelComps() *
 		     colorMap->getBits() + 7) / 8);


More information about the poppler mailing list