Ignore:
Timestamp:
Oct 19, 2008, 4:08:46 PM (13 years ago)
Author:
Eugene Romanenko
Message:

PDF plugin: Poppler library updated to version 0.10.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/SplashOutputDev.cc

    r254 r257  
    44//
    55// Copyright 2003 Glyph & Cog, LLC
     6//
     7//========================================================================
     8
     9//========================================================================
     10//
     11// Modified under the Poppler project - http://poppler.freedesktop.org
     12//
     13// All changes made under the Poppler project to this file are licensed
     14// under GPL version 2 or later
     15//
     16// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
     17// Copyright (C) 2006 Stefan Schweizer <genstef@gentoo.org>
     18// Copyright (C) 2006-2008 Albert Astals Cid <aacid@kde.org>
     19// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
     20// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
     21// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
     22//
     23// To see a description of the changes please see the Changelog file that
     24// came with your tarball or type make ChangeLog if you are building from git
    625//
    726//========================================================================
     
    396415
    397416// NB: This must match the GfxBlendMode enum defined in GfxState.h.
    398 SplashBlendFunc splashOutBlendFuncs[] = {
     417static const SplashBlendFunc splashOutBlendFuncs[] = {
    399418  NULL,
    400419  &splashOutBlendMultiply,
     
    498517  } else if (glyphSize <= 1024) {
    499518    cacheSets = 2;
     519  } else if (glyphSize <= 2048) {
     520    cacheSets = 1;
     521    cacheAssoc = 4;
     522  } else if (glyphSize <= 4096) {
     523    cacheSets = 1;
     524    cacheAssoc = 2;
    500525  } else {
    501526    cacheSets = 1;
    502   }
    503   cacheData = (Guchar *)gmallocn_checkoverflow(cacheSets * cacheAssoc, glyphSize);
     527    cacheAssoc = 1;
     528  }
     529  if (glyphSize < 10485760 / cacheAssoc / cacheSets) {
     530    cacheData = (Guchar *)gmallocn_checkoverflow(cacheSets * cacheAssoc, glyphSize);
     531  } else {
     532    error(-1, "Not creating cacheData for T3FontCache, it asked for too much memory.\n"
     533              "       This could teoretically result in wrong rendering,\n"
     534              "       but most probably the document is bogus.\n"
     535              "       Please report a bug if you think the rendering may be wrong because of this.");
     536    cacheData = NULL;
     537  }
    504538  if (cacheData != NULL)
    505539  {
     
    9671001  int faceIndex = 0;
    9681002  GBool recreateFont = gFalse;
     1003  GBool doAdjustFontMatrix = gFalse;
    9691004
    9701005  needFontUpdate = gFalse;
     
    10211056        break;
    10221057      }
     1058      doAdjustFontMatrix = gTrue;
    10231059    }
    10241060
     
    11491185      goto err2;
    11501186    }
    1151     fontFile->doAdjustMatrix = gTrue;
     1187    fontFile->doAdjustMatrix = doAdjustFontMatrix;
    11521188  }
    11531189
     
    15741610  }
    15751611
     1612  if (t3Font->cacheTags == NULL)
     1613    return;
     1614
    15761615  // allocate a cache entry
    15771616  i = (t3GlyphStack->code & (t3Font->cacheSets - 1)) * t3Font->cacheAssoc;
Note: See TracChangeset for help on using the changeset viewer.