Content-type: text/html
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).
Input / Output:
manager :: A handle to the cache manager.
Notes: 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_EXPORT( void ) FTC_Manager_Compress( FTC_Manager manager ); **** CACHE NODE DEFINITIONS **** **** 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. typedef FT_ListNodeRec FTC_CacheNodeRec; typedef FTC_CacheNodeRec* FTC_CacheNode; the field `cachenode.data' is typecast to this type typedef struct FTC_CacheNode_Data_ { FT_UShort cache_index; FT_Short ref_count; } FTC_CacheNode_Data; return a pointer to FTC_CacheNode_Data contained in a CacheNode's `data' field #define FTC_CACHENODE_TO_DATA_P( n ) ( (FTC_CacheNode_Data*)&(n)->data ) #define FTC_LIST_TO_CACHENODE( n ) ( (FTC_CacheNode)(n) ) FTC_CacheNode_SizeFunc
A function used to compute the total size in bytes of a given cache node. It is used by the cache manager to compute the number of old nodes to flush when the cache is full.
Input:
node :: A handle to the target cache node.
cache_data :: A generic pointer passed to the destructor. 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).
Input / Output:
manager :: A handle to the cache manager.
Notes: 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_EXPORT( void ) FTC_Manager_Compress( FTC_Manager manager ); **** CACHE NODE DEFINITIONS **** **** 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. typedef FT_ListNodeRec FTC_CacheNodeRec; typedef FTC_CacheNodeRec* FTC_CacheNode; the field `cachenode.data' is typecast to this type typedef struct FTC_CacheNode_Data_ { FT_UShort cache_index; FT_Short ref_count; } FTC_CacheNode_Data; return a pointer to FTC_CacheNode_Data contained in a CacheNode's `data' field #define FTC_CACHENODE_TO_DATA_P( n ) ( (FTC_CacheNode_Data*)&(n)->data ) #define FTC_LIST_TO_CACHENODE( n ) ( (FTC_CacheNode)(n) ) FTC_CacheNode_SizeFunc
A function used to compute the total size in bytes of a given cache node. It is used by the cache manager to compute the number of old nodes to flush when the cache is full.
Input:
node :: A handle to the target cache node.
cache_data :: A generic pointer passed to the destructor.
A function used to destroy a given cache node. It is called by the manager when the cache is full and old nodes need to be flushed out.
Input:
node :: A handle to the target cache node.
cache_data :: A generic pointer passed to the destructor. typedef void (*FTC_CacheNode_DestroyFunc)( FTC_CacheNode node, FT_Pointer cache_data );
The size of a given cache node in bytes. typedef FT_ULong (*FTC_CacheNode_SizeFunc)( FTC_CacheNode node, FT_Pointer cache_data ); FTC_CacheNode_DestroyFunc
This documentation was generated for Freetype 2.0.4 by autodocbook (http://www.stillhq.com). Autodocbook is (c) Michael Still 2001.
Copyright 1996-2000 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.
Please report errors in this documentation, and Freetype itself to freetype@freetype.org