From 58f56950848bae9c90da3873090c7698e0128b12 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 14 Aug 2019 11:13:36 +0200 Subject: Update bundled Freetype to 2.10.1 [ChangeLog][Freetype] Upgraded bundled Freetype version to 2.10.1. Fixes: QTBUG-77466 Change-Id: I1de8b8b03e0ffd0b17eeafff1017df7c638c9279 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/3rdparty/freetype/src/cache/Jamfile | 2 +- src/3rdparty/freetype/src/cache/ftcache.c | 32 +++--- src/3rdparty/freetype/src/cache/ftcbasic.c | 36 +++---- src/3rdparty/freetype/src/cache/ftccache.c | 34 +++--- src/3rdparty/freetype/src/cache/ftccache.h | 64 +++++------ src/3rdparty/freetype/src/cache/ftccback.h | 32 +++--- src/3rdparty/freetype/src/cache/ftccmap.c | 62 +++++------ src/3rdparty/freetype/src/cache/ftcerror.h | 48 ++++----- src/3rdparty/freetype/src/cache/ftcglyph.c | 32 +++--- src/3rdparty/freetype/src/cache/ftcglyph.h | 166 ++++++++++++++--------------- src/3rdparty/freetype/src/cache/ftcimage.c | 32 +++--- src/3rdparty/freetype/src/cache/ftcimage.h | 50 ++++----- src/3rdparty/freetype/src/cache/ftcmanag.c | 38 +++---- src/3rdparty/freetype/src/cache/ftcmanag.h | 143 +++++++++++++------------ src/3rdparty/freetype/src/cache/ftcmru.c | 32 +++--- src/3rdparty/freetype/src/cache/ftcmru.h | 80 +++++++------- src/3rdparty/freetype/src/cache/ftcsbits.c | 92 ++++++++-------- src/3rdparty/freetype/src/cache/ftcsbits.h | 32 +++--- src/3rdparty/freetype/src/cache/rules.mk | 4 +- 19 files changed, 504 insertions(+), 507 deletions(-) (limited to 'src/3rdparty/freetype/src/cache') diff --git a/src/3rdparty/freetype/src/cache/Jamfile b/src/3rdparty/freetype/src/cache/Jamfile index 53f4c7b603..51f7196d1b 100644 --- a/src/3rdparty/freetype/src/cache/Jamfile +++ b/src/3rdparty/freetype/src/cache/Jamfile @@ -1,6 +1,6 @@ # FreeType 2 src/cache Jamfile # -# Copyright 2001-2018 by +# Copyright (C) 2001-2019 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, diff --git a/src/3rdparty/freetype/src/cache/ftcache.c b/src/3rdparty/freetype/src/cache/ftcache.c index 1b425af911..a6a3e63ef0 100644 --- a/src/3rdparty/freetype/src/cache/ftcache.c +++ b/src/3rdparty/freetype/src/cache/ftcache.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcache.c */ -/* */ -/* The FreeType Caching sub-system (body only). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcache.c + * + * The FreeType Caching sub-system (body only). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #define FT_MAKE_OPTION_SINGLE_OBJECT diff --git a/src/3rdparty/freetype/src/cache/ftcbasic.c b/src/3rdparty/freetype/src/cache/ftcbasic.c index 994aa12286..a473585ebc 100644 --- a/src/3rdparty/freetype/src/cache/ftcbasic.c +++ b/src/3rdparty/freetype/src/cache/ftcbasic.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcbasic.c */ -/* */ -/* The FreeType basic cache interface (body). */ -/* */ -/* Copyright 2003-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcbasic.c + * + * The FreeType basic cache interface (body). + * + * Copyright (C) 2003-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -27,11 +27,11 @@ #include "ftccback.h" #include "ftcerror.h" -#define FT_COMPONENT trace_cache +#define FT_COMPONENT cache /* - * Basic Families + * Basic Families * */ typedef struct FTC_BasicAttrRec_ diff --git a/src/3rdparty/freetype/src/cache/ftccache.c b/src/3rdparty/freetype/src/cache/ftccache.c index 12ec585a25..f38ca44ddd 100644 --- a/src/3rdparty/freetype/src/cache/ftccache.c +++ b/src/3rdparty/freetype/src/cache/ftccache.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftccache.c */ -/* */ -/* The FreeType internal cache interface (body). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftccache.c + * + * The FreeType internal cache interface (body). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -25,7 +25,7 @@ #include "ftcerror.h" #undef FT_COMPONENT -#define FT_COMPONENT trace_cache +#define FT_COMPONENT cache #define FTC_HASH_MAX_LOAD 2 diff --git a/src/3rdparty/freetype/src/cache/ftccache.h b/src/3rdparty/freetype/src/cache/ftccache.h index 859c547e46..140ceadb11 100644 --- a/src/3rdparty/freetype/src/cache/ftccache.h +++ b/src/3rdparty/freetype/src/cache/ftccache.h @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftccache.h */ -/* */ -/* FreeType internal cache interface (specification). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftccache.h + * + * FreeType internal cache interface (specification). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #ifndef FTCCACHE_H_ @@ -42,17 +42,17 @@ FT_BEGIN_HEADER /*************************************************************************/ /*************************************************************************/ - /*************************************************************************/ - /* */ - /* Each cache controls one or more cache nodes. Each node is part of */ - /* the global_lru list of the manager. Its `data' field however is used */ - /* as a reference count for now. */ - /* */ - /* A node can be anything, depending on the type of information held by */ - /* the cache. It can be an individual glyph image, a set of bitmaps */ - /* glyphs for a given size, some metrics, etc. */ - /* */ - /*************************************************************************/ + /************************************************************************** + * + * Each cache controls one or more cache nodes. Each node is part of + * the global_lru list of the manager. Its `data' field however is used + * as a reference count for now. + * + * A node can be anything, depending on the type of information held by + * the cache. It can be an individual glyph image, a set of bitmaps + * glyphs for a given size, some metrics, etc. + * + */ /* structure size should be 20 bytes on 32-bits machines */ typedef struct FTC_NodeRec_ @@ -302,11 +302,11 @@ FT_BEGIN_HEADER * * Example: * - * { - * FTC_CACHE_TRYLOOP( cache ) - * error = load_data( ... ); - * FTC_CACHE_TRYLOOP_END() - * } + * { + * FTC_CACHE_TRYLOOP( cache ) + * error = load_data( ... ); + * FTC_CACHE_TRYLOOP_END() + * } * */ #define FTC_CACHE_TRYLOOP( cache ) \ diff --git a/src/3rdparty/freetype/src/cache/ftccback.h b/src/3rdparty/freetype/src/cache/ftccback.h index e51d8d6e55..9321bc3d4e 100644 --- a/src/3rdparty/freetype/src/cache/ftccback.h +++ b/src/3rdparty/freetype/src/cache/ftccback.h @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftccback.h */ -/* */ -/* Callback functions of the caching sub-system (specification only). */ -/* */ -/* Copyright 2004-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftccback.h + * + * Callback functions of the caching sub-system (specification only). + * + * Copyright (C) 2004-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #ifndef FTCCBACK_H_ #define FTCCBACK_H_ diff --git a/src/3rdparty/freetype/src/cache/ftccmap.c b/src/3rdparty/freetype/src/cache/ftccmap.c index d20b0f48fe..76ba10e3e9 100644 --- a/src/3rdparty/freetype/src/cache/ftccmap.c +++ b/src/3rdparty/freetype/src/cache/ftccmap.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftccmap.c */ -/* */ -/* FreeType CharMap cache (body) */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftccmap.c + * + * FreeType CharMap cache (body) + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -28,21 +28,21 @@ #include "ftcerror.h" #undef FT_COMPONENT -#define FT_COMPONENT trace_cache - - - /*************************************************************************/ - /* */ - /* Each FTC_CMapNode contains a simple array to map a range of character */ - /* codes to equivalent glyph indices. */ - /* */ - /* For now, the implementation is very basic: Each node maps a range of */ - /* 128 consecutive character codes to their corresponding glyph indices. */ - /* */ - /* We could do more complex things, but I don't think it is really very */ - /* useful. */ - /* */ - /*************************************************************************/ +#define FT_COMPONENT cache + + + /************************************************************************** + * + * Each FTC_CMapNode contains a simple array to map a range of character + * codes to equivalent glyph indices. + * + * For now, the implementation is very basic: Each node maps a range of + * 128 consecutive character codes to their corresponding glyph indices. + * + * We could do more complex things, but I don't think it is really very + * useful. + * + */ /* number of glyph indices / character code per node */ diff --git a/src/3rdparty/freetype/src/cache/ftcerror.h b/src/3rdparty/freetype/src/cache/ftcerror.h index a26cd5935b..e2d6417180 100644 --- a/src/3rdparty/freetype/src/cache/ftcerror.h +++ b/src/3rdparty/freetype/src/cache/ftcerror.h @@ -1,27 +1,27 @@ -/***************************************************************************/ -/* */ -/* ftcerror.h */ -/* */ -/* Caching sub-system error codes (specification only). */ -/* */ -/* Copyright 2001-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* This file is used to define the caching sub-system error enumeration */ - /* constants. */ - /* */ - /*************************************************************************/ +/**************************************************************************** + * + * ftcerror.h + * + * Caching sub-system error codes (specification only). + * + * Copyright (C) 2001-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + + /************************************************************************** + * + * This file is used to define the caching sub-system error enumeration + * constants. + * + */ #ifndef FTCERROR_H_ #define FTCERROR_H_ diff --git a/src/3rdparty/freetype/src/cache/ftcglyph.c b/src/3rdparty/freetype/src/cache/ftcglyph.c index 782cc0ed09..2a0e97d4af 100644 --- a/src/3rdparty/freetype/src/cache/ftcglyph.c +++ b/src/3rdparty/freetype/src/cache/ftcglyph.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcglyph.c */ -/* */ -/* FreeType Glyph Image (FT_Glyph) cache (body). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcglyph.c + * + * FreeType Glyph Image (FT_Glyph) cache (body). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include diff --git a/src/3rdparty/freetype/src/cache/ftcglyph.h b/src/3rdparty/freetype/src/cache/ftcglyph.h index 23c24d223f..5a1f0e2a74 100644 --- a/src/3rdparty/freetype/src/cache/ftcglyph.h +++ b/src/3rdparty/freetype/src/cache/ftcglyph.h @@ -1,101 +1,101 @@ -/***************************************************************************/ -/* */ -/* ftcglyph.h */ -/* */ -/* FreeType abstract glyph cache (specification). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcglyph.h + * + * FreeType abstract glyph cache (specification). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ /* * - * FTC_GCache is an _abstract_ cache object optimized to store glyph - * data. It works as follows: + * FTC_GCache is an _abstract_ cache object optimized to store glyph + * data. It works as follows: * - * - It manages FTC_GNode objects. Each one of them can hold one or more - * glyph `items'. Item types are not specified in the FTC_GCache but - * in classes that extend it. + * - It manages FTC_GNode objects. Each one of them can hold one or more + * glyph `items'. Item types are not specified in the FTC_GCache but + * in classes that extend it. * - * - Glyph attributes, like face ID, character size, render mode, etc., - * can be grouped into abstract `glyph families'. This avoids storing - * the attributes within the FTC_GCache, since it is likely that many - * FTC_GNodes will belong to the same family in typical uses. + * - Glyph attributes, like face ID, character size, render mode, etc., + * can be grouped into abstract `glyph families'. This avoids storing + * the attributes within the FTC_GCache, since it is likely that many + * FTC_GNodes will belong to the same family in typical uses. * - * - Each FTC_GNode is thus an FTC_Node with two additional fields: + * - Each FTC_GNode is thus an FTC_Node with two additional fields: * - * * gindex: A glyph index, or the first index in a glyph range. - * * family: A pointer to a glyph `family'. + * * gindex: A glyph index, or the first index in a glyph range. + * * family: A pointer to a glyph `family'. * - * - Family types are not fully specific in the FTC_Family type, but - * by classes that extend it. + * - Family types are not fully specific in the FTC_Family type, but + * by classes that extend it. * - * Note that both FTC_ImageCache and FTC_SBitCache extend FTC_GCache. - * They share an FTC_Family sub-class called FTC_BasicFamily which is - * used to store the following data: face ID, pixel/point sizes, load - * flags. For more details see the file `src/cache/ftcbasic.c'. + * Note that both FTC_ImageCache and FTC_SBitCache extend FTC_GCache. + * They share an FTC_Family sub-class called FTC_BasicFamily which is + * used to store the following data: face ID, pixel/point sizes, load + * flags. For more details see the file `src/cache/ftcbasic.c'. * - * Client applications can extend FTC_GNode with their own FTC_GNode - * and FTC_Family sub-classes to implement more complex caches (e.g., - * handling automatic synthesis, like obliquing & emboldening, colored - * glyphs, etc.). + * Client applications can extend FTC_GNode with their own FTC_GNode + * and FTC_Family sub-classes to implement more complex caches (e.g., + * handling automatic synthesis, like obliquing & emboldening, colored + * glyphs, etc.). * - * See also the FTC_ICache & FTC_SCache classes in `ftcimage.h' and - * `ftcsbits.h', which both extend FTC_GCache with additional - * optimizations. + * See also the FTC_ICache & FTC_SCache classes in `ftcimage.h' and + * `ftcsbits.h', which both extend FTC_GCache with additional + * optimizations. * - * A typical FTC_GCache implementation must provide at least the - * following: + * A typical FTC_GCache implementation must provide at least the + * following: * - * - FTC_GNode sub-class, e.g. MyNode, with relevant methods: - * my_node_new (must call FTC_GNode_Init) - * my_node_free (must call FTC_GNode_Done) - * my_node_compare (must call FTC_GNode_Compare) - * my_node_remove_faceid (must call ftc_gnode_unselect in case - * of match) + * - FTC_GNode sub-class, e.g. MyNode, with relevant methods: + * my_node_new (must call FTC_GNode_Init) + * my_node_free (must call FTC_GNode_Done) + * my_node_compare (must call FTC_GNode_Compare) + * my_node_remove_faceid (must call ftc_gnode_unselect in case + * of match) * - * - FTC_Family sub-class, e.g. MyFamily, with relevant methods: - * my_family_compare - * my_family_init - * my_family_reset (optional) - * my_family_done + * - FTC_Family sub-class, e.g. MyFamily, with relevant methods: + * my_family_compare + * my_family_init + * my_family_reset (optional) + * my_family_done * - * - FTC_GQuery sub-class, e.g. MyQuery, to hold cache-specific query - * data. + * - FTC_GQuery sub-class, e.g. MyQuery, to hold cache-specific query + * data. * - * - Constant structures for a FTC_GNodeClass. + * - Constant structures for a FTC_GNodeClass. * - * - MyCacheNew() can be implemented easily as a call to the convenience - * function FTC_GCache_New. + * - MyCacheNew() can be implemented easily as a call to the convenience + * function FTC_GCache_New. * - * - MyCacheLookup with a call to FTC_GCache_Lookup. This function will - * automatically: + * - MyCacheLookup with a call to FTC_GCache_Lookup. This function will + * automatically: * - * - Search for the corresponding family in the cache, or create - * a new one if necessary. Put it in FTC_GQUERY(myquery).family + * - Search for the corresponding family in the cache, or create + * a new one if necessary. Put it in FTC_GQUERY(myquery).family * - * - Call FTC_Cache_Lookup. + * - Call FTC_Cache_Lookup. * - * If it returns NULL, you should create a new node, then call - * ftc_cache_add as usual. + * If it returns NULL, you should create a new node, then call + * ftc_cache_add as usual. */ - /*************************************************************************/ - /* */ - /* Important: The functions defined in this file are only used to */ - /* implement an abstract glyph cache class. You need to */ - /* provide additional logic to implement a complete cache. */ - /* */ - /*************************************************************************/ + /************************************************************************** + * + * Important: The functions defined in this file are only used to + * implement an abstract glyph cache class. You need to + * provide additional logic to implement a complete cache. + * + */ /*************************************************************************/ @@ -125,11 +125,11 @@ FT_BEGIN_HEADER /* - * We can group glyphs into `families'. Each family correspond to a - * given face ID, character size, transform, etc. + * We can group glyphs into `families'. Each family correspond to a + * given face ID, character size, transform, etc. * - * Families are implemented as MRU list nodes. They are - * reference-counted. + * Families are implemented as MRU list nodes. They are + * reference-counted. */ typedef struct FTC_FamilyRec_ @@ -167,12 +167,12 @@ FT_BEGIN_HEADER #define FTC_GQUERY( x ) ( (FTC_GQuery)(x) ) - /*************************************************************************/ - /* */ - /* These functions are exported so that they can be called from */ - /* user-provided cache classes; otherwise, they are really part of the */ - /* cache sub-system internals. */ - /* */ + /************************************************************************** + * + * These functions are exported so that they can be called from + * user-provided cache classes; otherwise, they are really part of the + * cache sub-system internals. + */ /* must be called by derived FTC_Node_InitFunc routines */ FT_LOCAL( void ) diff --git a/src/3rdparty/freetype/src/cache/ftcimage.c b/src/3rdparty/freetype/src/cache/ftcimage.c index 77a100153e..9e64d51a22 100644 --- a/src/3rdparty/freetype/src/cache/ftcimage.c +++ b/src/3rdparty/freetype/src/cache/ftcimage.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcimage.c */ -/* */ -/* FreeType Image cache (body). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcimage.c + * + * FreeType Image cache (body). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include diff --git a/src/3rdparty/freetype/src/cache/ftcimage.h b/src/3rdparty/freetype/src/cache/ftcimage.h index 24a221053b..dcb101fabc 100644 --- a/src/3rdparty/freetype/src/cache/ftcimage.h +++ b/src/3rdparty/freetype/src/cache/ftcimage.h @@ -1,35 +1,35 @@ -/***************************************************************************/ -/* */ -/* ftcimage.h */ -/* */ -/* FreeType Generic Image cache (specification) */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcimage.h + * + * FreeType Generic Image cache (specification) + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ /* - * FTC_ICache is an _abstract_ cache used to store a single FT_Glyph - * image per cache node. + * FTC_ICache is an _abstract_ cache used to store a single FT_Glyph + * image per cache node. * - * FTC_ICache extends FTC_GCache. For an implementation example, - * see FTC_ImageCache in `src/cache/ftbasic.c'. + * FTC_ICache extends FTC_GCache. For an implementation example, + * see FTC_ImageCache in `src/cache/ftbasic.c'. */ - /*************************************************************************/ - /* */ - /* Each image cache really manages FT_Glyph objects. */ - /* */ - /*************************************************************************/ + /************************************************************************** + * + * Each image cache really manages FT_Glyph objects. + * + */ #ifndef FTCIMAGE_H_ diff --git a/src/3rdparty/freetype/src/cache/ftcmanag.c b/src/3rdparty/freetype/src/cache/ftcmanag.c index 2bcd9df502..bd585968e3 100644 --- a/src/3rdparty/freetype/src/cache/ftcmanag.c +++ b/src/3rdparty/freetype/src/cache/ftcmanag.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcmanag.c */ -/* */ -/* FreeType Cache Manager (body). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcmanag.c + * + * FreeType Cache Manager (body). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -26,13 +26,9 @@ #include "ftccback.h" #include "ftcerror.h" -#ifdef FT_CONFIG_OPTION_PIC -#error "cache system does not support PIC yet" -#endif - #undef FT_COMPONENT -#define FT_COMPONENT trace_cache +#define FT_COMPONENT cache static FT_Error diff --git a/src/3rdparty/freetype/src/cache/ftcmanag.h b/src/3rdparty/freetype/src/cache/ftcmanag.h index b4b4755356..60c66c8fc8 100644 --- a/src/3rdparty/freetype/src/cache/ftcmanag.h +++ b/src/3rdparty/freetype/src/cache/ftcmanag.h @@ -1,47 +1,47 @@ -/***************************************************************************/ -/* */ -/* ftcmanag.h */ -/* */ -/* FreeType Cache Manager (specification). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* A cache manager is in charge of the following: */ - /* */ - /* - Maintain a mapping between generic FTC_FaceIDs and live FT_Face */ - /* objects. The mapping itself is performed through a user-provided */ - /* callback. However, the manager maintains a small cache of FT_Face */ - /* and FT_Size objects in order to speed up things considerably. */ - /* */ - /* - Manage one or more cache objects. Each cache is in charge of */ - /* holding a varying number of `cache nodes'. Each cache node */ - /* represents a minimal amount of individually accessible cached */ - /* data. For example, a cache node can be an FT_Glyph image */ - /* containing a vector outline, or some glyph metrics, or anything */ - /* else. */ - /* */ - /* Each cache node has a certain size in bytes that is added to the */ - /* total amount of `cache memory' within the manager. */ - /* */ - /* All cache nodes are located in a global LRU list, where the oldest */ - /* node is at the tail of the list. */ - /* */ - /* Each node belongs to a single cache, and includes a reference */ - /* count to avoid destroying it (due to caching). */ - /* */ - /*************************************************************************/ +/**************************************************************************** + * + * ftcmanag.h + * + * FreeType Cache Manager (specification). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + + /************************************************************************** + * + * A cache manager is in charge of the following: + * + * - Maintain a mapping between generic FTC_FaceIDs and live FT_Face + * objects. The mapping itself is performed through a user-provided + * callback. However, the manager maintains a small cache of FT_Face + * and FT_Size objects in order to speed up things considerably. + * + * - Manage one or more cache objects. Each cache is in charge of + * holding a varying number of `cache nodes'. Each cache node + * represents a minimal amount of individually accessible cached + * data. For example, a cache node can be an FT_Glyph image + * containing a vector outline, or some glyph metrics, or anything + * else. + * + * Each cache node has a certain size in bytes that is added to the + * total amount of `cache memory' within the manager. + * + * All cache nodes are located in a global LRU list, where the oldest + * node is at the tail of the list. + * + * Each node belongs to a single cache, and includes a reference + * count to avoid destroying it (due to caching). + * + */ /*************************************************************************/ @@ -72,12 +72,12 @@ FT_BEGIN_HEADER - /*************************************************************************/ - /* */ - /*
*/ - /* cache_subsystem */ - /* */ - /*************************************************************************/ + /************************************************************************** + * + * @Section: + * cache_subsystem + * + */ #define FTC_MAX_FACES_DEFAULT 2 @@ -110,27 +110,28 @@ FT_BEGIN_HEADER } FTC_ManagerRec; - /*************************************************************************/ - /* */ - /* */ - /* FTC_Manager_Compress */ - /* */ - /* */ - /* This function is used to check the state of the cache manager if */ - /* its `num_bytes' field is greater than its `max_bytes' field. It */ - /* will flush as many old cache nodes as possible (ignoring cache */ - /* nodes with a non-zero reference count). */ - /* */ - /* */ - /* manager :: A handle to the cache manager. */ - /* */ - /* */ - /* Client applications should not call this function directly. It is */ - /* normally invoked by specific cache implementations. */ - /* */ - /* The reason this function is exported is to allow client-specific */ - /* cache classes. */ - /* */ + /************************************************************************** + * + * @Function: + * FTC_Manager_Compress + * + * @Description: + * This function is used to check the state of the cache manager if + * its `num_bytes' field is greater than its `max_bytes' field. It + * will flush as many old cache nodes as possible (ignoring cache + * nodes with a non-zero reference count). + * + * @InOut: + * manager :: + * A handle to the cache manager. + * + * @Note: + * Client applications should not call this function directly. It is + * normally invoked by specific cache implementations. + * + * The reason this function is exported is to allow client-specific + * cache classes. + */ FT_LOCAL( void ) FTC_Manager_Compress( FTC_Manager manager ); diff --git a/src/3rdparty/freetype/src/cache/ftcmru.c b/src/3rdparty/freetype/src/cache/ftcmru.c index 1087be4d89..18a7b80054 100644 --- a/src/3rdparty/freetype/src/cache/ftcmru.c +++ b/src/3rdparty/freetype/src/cache/ftcmru.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcmru.c */ -/* */ -/* FreeType MRU support (body). */ -/* */ -/* Copyright 2003-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcmru.c + * + * FreeType MRU support (body). + * + * Copyright (C) 2003-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include diff --git a/src/3rdparty/freetype/src/cache/ftcmru.h b/src/3rdparty/freetype/src/cache/ftcmru.h index 82396b917d..58721ed340 100644 --- a/src/3rdparty/freetype/src/cache/ftcmru.h +++ b/src/3rdparty/freetype/src/cache/ftcmru.h @@ -1,43 +1,43 @@ -/***************************************************************************/ -/* */ -/* ftcmru.h */ -/* */ -/* Simple MRU list-cache (specification). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ - - - /*************************************************************************/ - /* */ - /* An MRU is a list that cannot hold more than a certain number of */ - /* elements (`max_elements'). All elements in the list are sorted in */ - /* least-recently-used order, i.e., the `oldest' element is at the tail */ - /* of the list. */ - /* */ - /* When doing a lookup (either through `Lookup()' or `Lookup_Node()'), */ - /* the list is searched for an element with the corresponding key. If */ - /* it is found, the element is moved to the head of the list and is */ - /* returned. */ - /* */ - /* If no corresponding element is found, the lookup routine will try to */ - /* obtain a new element with the relevant key. If the list is already */ - /* full, the oldest element from the list is discarded and replaced by a */ - /* new one; a new element is added to the list otherwise. */ - /* */ - /* Note that it is possible to pre-allocate the element list nodes. */ - /* This is handy if `max_elements' is sufficiently small, as it saves */ - /* allocations/releases during the lookup process. */ - /* */ - /*************************************************************************/ +/**************************************************************************** + * + * ftcmru.h + * + * Simple MRU list-cache (specification). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ + + + /************************************************************************** + * + * An MRU is a list that cannot hold more than a certain number of + * elements (`max_elements'). All elements in the list are sorted in + * least-recently-used order, i.e., the `oldest' element is at the tail + * of the list. + * + * When doing a lookup (either through `Lookup()' or `Lookup_Node()'), + * the list is searched for an element with the corresponding key. If + * it is found, the element is moved to the head of the list and is + * returned. + * + * If no corresponding element is found, the lookup routine will try to + * obtain a new element with the relevant key. If the list is already + * full, the oldest element from the list is discarded and replaced by a + * new one; a new element is added to the list otherwise. + * + * Note that it is possible to pre-allocate the element list nodes. + * This is handy if `max_elements' is sufficiently small, as it saves + * allocations/releases during the lookup process. + * + */ #ifndef FTCMRU_H_ diff --git a/src/3rdparty/freetype/src/cache/ftcsbits.c b/src/3rdparty/freetype/src/cache/ftcsbits.c index 018f1ecdb7..06b46c896e 100644 --- a/src/3rdparty/freetype/src/cache/ftcsbits.c +++ b/src/3rdparty/freetype/src/cache/ftcsbits.c @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcsbits.c */ -/* */ -/* FreeType sbits manager (body). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcsbits.c + * + * FreeType sbits manager (body). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #include @@ -27,7 +27,7 @@ #include "ftcerror.h" #undef FT_COMPONENT -#define FT_COMPONENT trace_cache +#define FT_COMPONENT cache /*************************************************************************/ @@ -91,14 +91,14 @@ /* - * This function tries to load a small bitmap within a given FTC_SNode. - * Note that it returns a non-zero error code _only_ in the case of - * out-of-memory condition. For all other errors (e.g., corresponding - * to a bad font file), this function will mark the sbit as `unavailable' - * and return a value of 0. + * This function tries to load a small bitmap within a given FTC_SNode. + * Note that it returns a non-zero error code _only_ in the case of + * out-of-memory condition. For all other errors (e.g., corresponding + * to a bad font file), this function will mark the sbit as `unavailable' + * and return a value of 0. * - * You should also read the comment within the @ftc_snode_compare - * function below to see how out-of-memory is handled during a lookup. + * You should also read the comment within the @ftc_snode_compare + * function below to see how out-of-memory is handled during a lookup. */ static FT_Error ftc_snode_load( FTC_SNode snode, @@ -347,34 +347,34 @@ /* - * The following code illustrates what to do when you want to - * perform operations that may fail within a lookup function. + * The following code illustrates what to do when you want to + * perform operations that may fail within a lookup function. * - * Here, we want to load a small bitmap on-demand; we thus - * need to call the `ftc_snode_load' function which may return - * a non-zero error code only when we are out of memory (OOM). + * Here, we want to load a small bitmap on-demand; we thus + * need to call the `ftc_snode_load' function which may return + * a non-zero error code only when we are out of memory (OOM). * - * The correct thing to do is to use @FTC_CACHE_TRYLOOP and - * @FTC_CACHE_TRYLOOP_END in order to implement a retry loop - * that is capable of flushing the cache incrementally when - * an OOM errors occur. + * The correct thing to do is to use @FTC_CACHE_TRYLOOP and + * @FTC_CACHE_TRYLOOP_END in order to implement a retry loop + * that is capable of flushing the cache incrementally when + * an OOM errors occur. * - * However, we need to `lock' the node before this operation to - * prevent it from being flushed within the loop. + * However, we need to `lock' the node before this operation to + * prevent it from being flushed within the loop. * - * When we exit the loop, we unlock the node, then check the `error' - * variable. If it is non-zero, this means that the cache was - * completely flushed and that no usable memory was found to load - * the bitmap. + * When we exit the loop, we unlock the node, then check the `error' + * variable. If it is non-zero, this means that the cache was + * completely flushed and that no usable memory was found to load + * the bitmap. * - * We then prefer to return a value of 0 (i.e., NO MATCH). This - * ensures that the caller will try to allocate a new node. - * This operation consequently _fail_ and the lookup function - * returns the appropriate OOM error code. + * We then prefer to return a value of 0 (i.e., NO MATCH). This + * ensures that the caller will try to allocate a new node. + * This operation consequently _fail_ and the lookup function + * returns the appropriate OOM error code. * - * Note that `buffer == NULL && width == 255' is a hack used to - * tag `unavailable' bitmaps in the array. We should never try - * to load these. + * Note that `buffer == NULL && width == 255' is a hack used to + * tag `unavailable' bitmaps in the array. We should never try + * to load these. * */ diff --git a/src/3rdparty/freetype/src/cache/ftcsbits.h b/src/3rdparty/freetype/src/cache/ftcsbits.h index 206a1bb3fc..f1b71c2835 100644 --- a/src/3rdparty/freetype/src/cache/ftcsbits.h +++ b/src/3rdparty/freetype/src/cache/ftcsbits.h @@ -1,19 +1,19 @@ -/***************************************************************************/ -/* */ -/* ftcsbits.h */ -/* */ -/* A small-bitmap cache (specification). */ -/* */ -/* Copyright 2000-2018 by */ -/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -/* */ -/* This file is part of the FreeType project, and may only be used, */ -/* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -/* this file you indicate that you have read the license and */ -/* understand and accept it fully. */ -/* */ -/***************************************************************************/ +/**************************************************************************** + * + * ftcsbits.h + * + * A small-bitmap cache (specification). + * + * Copyright (C) 2000-2019 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ #ifndef FTCSBITS_H_ diff --git a/src/3rdparty/freetype/src/cache/rules.mk b/src/3rdparty/freetype/src/cache/rules.mk index 558935976d..1618d98303 100644 --- a/src/3rdparty/freetype/src/cache/rules.mk +++ b/src/3rdparty/freetype/src/cache/rules.mk @@ -3,7 +3,7 @@ # -# Copyright 2000-2018 by +# Copyright (C) 2000-2019 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, @@ -15,7 +15,7 @@ # Cache driver directory # -CACHE_DIR := $(SRC_DIR)/cache +CACHE_DIR := $(SRC_DIR)/cache # compilation flags for the driver -- cgit v1.2.3