goo/Makefile.am | 1 msvc/config.h | 62 --------------------------------- msvc/poppler/poppler-config.h | 77 ------------------------------------------ poppler/Gfx.cc | 14 ++++--- poppler/PopplerCache.cc | 12 +++--- poppler/PopplerCache.h | 6 +-- 6 files changed, 18 insertions(+), 154 deletions(-)
New commits: commit 8672217af4cf88d5506572c2b40fbb0d1d0dbd87 Author: Albert Astals Cid <aa...@kde.org> Date: Mon Jan 25 00:11:50 2010 +0000 Make the poppler object cache params be a ref And make sure what we was is a ref, otherwise we abort diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index f6b23d5..a8713a4 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jonathan Blandford <j...@redhat.com> -// Copyright (C) 2005-2009 Albert Astals Cid <aa...@kde.org> +// Copyright (C) 2005-2010 Albert Astals Cid <aa...@kde.org> // Copyright (C) 2006 Thorkild Stray <thork...@ifi.uio.no> // Copyright (C) 2006 Kristian Høgsberg <k...@redhat.com> // Copyright (C) 2006-2010 Carlos Garcia Campos <carlo...@gnome.org> @@ -481,16 +481,18 @@ GfxShading *GfxResources::lookupShading(char *name, Gfx *gfx) { } GBool GfxResources::lookupGState(char *name, Object *obj) { - Object objRef; - - if (!lookupGStateNF(name, &objRef)) + if (!lookupGStateNF(name, obj)) return gFalse; - if (!gStateCache.lookup(&objRef, obj)->isNull()) + if (!obj->isRef()) + return gTrue; + + const Ref ref = obj->getRef(); + if (!gStateCache.lookup(ref, obj)->isNull()) return gTrue; obj->free(); - gStateCache.put(&objRef)->copy(obj); + gStateCache.put(ref)->copy(obj); return gTrue; } diff --git a/poppler/PopplerCache.cc b/poppler/PopplerCache.cc index 01bd471..6018a77 100644 --- a/poppler/PopplerCache.cc +++ b/poppler/PopplerCache.cc @@ -5,13 +5,15 @@ // This file is licensed under the GPLv2 or later // // Copyright (C) 2009 Koji Otani <s...@bbr.jp> -// Copyright (C) 2009 Albert Astals Cid <aa...@kde.org> +// Copyright (C) 2009, 2010 Albert Astals Cid <aa...@kde.org> // Copyright (C) 2010 Carlos Garcia Campos <carlo...@gnome.org> // //======================================================================== #include "PopplerCache.h" +#include "XRef.h" + PopplerCacheKey::~PopplerCacheKey() { } @@ -141,10 +143,9 @@ PopplerObjectCache::~PopplerObjectCache() { delete cache; } -Object *PopplerObjectCache::put(Object *objRef) { - Ref ref = objRef->getRef(); +Object *PopplerObjectCache::put(const Ref &ref) { Object obj; - objRef->fetch(xref, &obj); + xref->fetch(ref.num, ref.gen, &obj); ObjectKey *key = new ObjectKey(ref.num, ref.gen); ObjectItem *item = new ObjectItem(&obj); @@ -154,8 +155,7 @@ Object *PopplerObjectCache::put(Object *objRef) { return &item->item; } -Object *PopplerObjectCache::lookup(Object *objRef, Object *obj) { - Ref ref = objRef->getRef(); +Object *PopplerObjectCache::lookup(const Ref &ref, Object *obj) { ObjectKey key(ref.num, ref.gen); ObjectItem *item = static_cast<ObjectItem *>(cache->lookup(key)); diff --git a/poppler/PopplerCache.h b/poppler/PopplerCache.h index d5cc9fb..74010a2 100644 --- a/poppler/PopplerCache.h +++ b/poppler/PopplerCache.h @@ -5,7 +5,7 @@ // This file is licensed under the GPLv2 or later // // Copyright (C) 2009 Koji Otani <s...@bbr.jp> -// Copyright (C) 2009 Albert Astals Cid <aa...@kde.org> +// Copyright (C) 2009, 2010 Albert Astals Cid <aa...@kde.org> // Copyright (C) 2010 Carlos Garcia Campos <carlo...@gnome.org> // //======================================================================== @@ -67,8 +67,8 @@ class PopplerObjectCache PopplerObjectCache (int cacheSizeA, XRef *xrefA); ~PopplerObjectCache(); - Object *put(Object *objRef); - Object *lookup(Object *objRef, Object *obj); + Object *put(const Ref &ref); + Object *lookup(const Ref &ref, Object *obj); private: XRef *xref; commit 9567fd8d3d905897d0abacd77885102ae86ba8a9 Author: Albert Astals Cid <aa...@kde.org> Date: Sun Jan 24 20:15:49 2010 +0000 ImgWriter is a header too diff --git a/goo/Makefile.am b/goo/Makefile.am index b8a81ed..aad1108 100644 --- a/goo/Makefile.am +++ b/goo/Makefile.am @@ -16,6 +16,7 @@ poppler_goo_include_HEADERS = \ FixedPoint.h \ PNGWriter.h \ JpegWriter.h \ + ImgWriter.h \ gstrtod.h endif commit 735e8a690d0bd3ab4bec90bdad975d19ac3d4689 Author: Albert Astals Cid <aa...@kde.org> Date: Sun Jan 24 19:51:19 2010 +0000 noone maintains this either diff --git a/msvc/config.h b/msvc/config.h deleted file mode 100644 index 8bc5ea0..0000000 --- a/msvc/config.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Use libjpeg instead of builtin jpeg decoder. */ -#define ENABLE_LIBJPEG 1 - -/* Have FreeType2 include files */ -#define HAVE_FREETYPE_H 1 - -/* Use splash for rendering. */ -#define HAVE_SPLASH 1 - -/* Define to 1 if you have the <memory.h> header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the <stdlib.h> header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the <strings.h> header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the <string.h> header file. */ -#define HAVE_STRING_H 1 - -/* Enable multithreading support. */ -#define MULTITHREADED 1 - -/* Name of package */ -#define PACKAGE "poppler" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "poppler" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "poppler 0.12.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "poppler" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.12.0" - -/* Poppler data dir */ -#define POPPLER_DATADIR "/usr/local/share/poppler" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Enable word list support. */ -#define TEXTOUT_WORD_LIST 1 - -/* Throw exceptions to deal with not enough memory and similar problems */ -/* #undef USE_EXCEPTIONS */ - -/* Version number of package */ -#define VERSION "0.12.0" - -#define snprintf _snprintf -#define unlink _unlink -#define fileno _fileno -#define setmode _setmode - diff --git a/msvc/poppler/poppler-config.h b/msvc/poppler/poppler-config.h deleted file mode 100644 index 487fb13..0000000 --- a/msvc/poppler/poppler-config.h +++ /dev/null @@ -1,77 +0,0 @@ -//================================================= -*- mode: c++ -*- ==== -// -// poppler-config.h -// -// Copyright 1996-2004 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef POPPLER_CONFIG_H -#define POPPLER_CONFIG_H - -// We duplicate some of the config.h #define's here since they are -// used in some of the header files we install. The #ifndef/#endif -// around #undef look odd, but it's to silence warnings about -// redefining those symbols. - -/* Include support for OPI comments. */ -#ifndef OPI_SUPPORT -#define OPI_SUPPORT 1 -#endif - -/* Enable word list support. */ -#ifndef TEXTOUT_WORD_LIST -#define TEXTOUT_WORD_LIST 1 -#endif - -// Also, there's a couple of preprocessor symbols in the header files -// that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and - -//------------------------------------------------------------------------ -// version -//------------------------------------------------------------------------ - -// copyright notice -#define popplerCopyright "Copyright 2005-2009 The Poppler Developers - http://poppler.freedesktop.org" -#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC" - -//------------------------------------------------------------------------ -// popen -//------------------------------------------------------------------------ - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#define popen _popen -#define pclose _pclose -#endif - -#if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__) || defined(MACOS) -#define POPEN_READ_MODE "rb" -#else -#define POPEN_READ_MODE "r" -#endif - -//------------------------------------------------------------------------ -// Win32 stuff -//------------------------------------------------------------------------ - -#if defined(_MSC_VER) || defined(__BORLANDC__) -#ifndef CDECL -#define CDECL __cdecl -#endif -#else -#define CDECL -#endif - -//------------------------------------------------------------------------ -// Compiler -//------------------------------------------------------------------------ - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ - __attribute__((__format__(__printf__, fmt_index, va_index))) -#else -#define GCC_PRINTF_FORMAT(fmt_index, va_index) -#endif - - -#endif /* POPPLER_CONFIG_H */
_______________________________________________ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler