summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/cache/ftccache.c
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2013-03-26 08:57:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-01 12:03:55 +0200
commit6845a4fb0147117e8517d66f18792ca7acdbe06e (patch)
tree68e35417b79989a7af8a4ea8c0d282b84dbe0a6e /src/3rdparty/freetype/src/cache/ftccache.c
parent0fcadcca3d0842354de07ffaa8c622e607aab22c (diff)
Update bundled FreeType sources to 2.3.12
Most important changes: * SFNT cmap 13 table format support; * fixed glitches when rasterizing stretched TTF (xsize!=ysize); * various fixes in Type1, CFF, and PCF drivers Change-Id: Ib9e2210ffbd0daa2fdbf518ea87f4be502de6b48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/freetype/src/cache/ftccache.c')
-rw-r--r--src/3rdparty/freetype/src/cache/ftccache.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/3rdparty/freetype/src/cache/ftccache.c b/src/3rdparty/freetype/src/cache/ftccache.c
index f3e699c385..463addd99b 100644
--- a/src/3rdparty/freetype/src/cache/ftccache.c
+++ b/src/3rdparty/freetype/src/cache/ftccache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,9 @@
#include "ftccback.h"
#include "ftcerror.h"
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_cache
+
#define FTC_HASH_MAX_LOAD 2
#define FTC_HASH_MIN_LOAD 1
@@ -93,9 +96,9 @@
for (;;)
{
FTC_Node node, *pnode;
- FT_UInt p = cache->p;
- FT_UInt mask = cache->mask;
- FT_UInt count = mask + p + 1; /* number of buckets */
+ FT_UFast p = cache->p;
+ FT_UFast mask = cache->mask;
+ FT_UFast count = mask + p + 1; /* number of buckets */
/* do we need to shrink the buckets array? */
@@ -153,7 +156,7 @@
/* do we need to expand the buckets array? */
else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )
{
- FT_UInt old_index = p + mask;
+ FT_UFast old_index = p + mask;
FTC_Node* pold;
@@ -216,7 +219,7 @@
if ( node == NULL )
{
- FT_ERROR(( "ftc_node_hash_unlink: unknown node!\n" ));
+ FT_TRACE0(( "ftc_node_hash_unlink: unknown node\n" ));
return;
}
@@ -273,7 +276,7 @@
/* find node's cache */
if ( node->cache_index >= manager->num_caches )
{
- FT_ERROR(( "ftc_node_destroy: invalid node handle\n" ));
+ FT_TRACE0(( "ftc_node_destroy: invalid node handle\n" ));
return;
}
#endif
@@ -283,7 +286,7 @@
#ifdef FT_DEBUG_ERROR
if ( cache == NULL )
{
- FT_ERROR(( "ftc_node_destroy: invalid node handle\n" ));
+ FT_TRACE0(( "ftc_node_destroy: invalid node handle\n" ));
return;
}
#endif
@@ -302,7 +305,7 @@
#if 0
/* check, just in case of general corruption :-) */
if ( manager->num_nodes == 0 )
- FT_ERROR(( "ftc_node_destroy: invalid cache node count! = %d\n",
+ FT_TRACE0(( "ftc_node_destroy: invalid cache node count (%d)\n",
manager->num_nodes ));
#endif
}
@@ -347,7 +350,7 @@
{
FTC_Manager manager = cache->manager;
FT_UFast i;
- FT_UInt count;
+ FT_UFast count;
count = cache->p + cache->mask + 1;