/* Copyright (C) 1997 artofcode LLC. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307. */ /*$Id: gxpcache.h,v 1.2.6.1.2.1 2003/01/17 00:49:04 giles Exp $ */ /* Definition of Pattern cache */ #ifndef gxpcache_INCLUDED # define gxpcache_INCLUDED /* * Define a cache for rendered Patterns. This is currently an open * hash table with single probing (no reprobing) and round-robin * replacement. Obviously, we can do better in both areas. */ #ifndef gx_pattern_cache_DEFINED # define gx_pattern_cache_DEFINED typedef struct gx_pattern_cache_s gx_pattern_cache; #endif #ifndef gx_color_tile_DEFINED # define gx_color_tile_DEFINED typedef struct gx_color_tile_s gx_color_tile; #endif struct gx_pattern_cache_s { gs_memory_t *memory; gx_color_tile *tiles; uint num_tiles; uint tiles_used; uint next; /* round-robin index */ ulong bits_used; ulong max_bits; void (*free_all) (P1(gx_pattern_cache *)); }; #define private_st_pattern_cache() /* in gxpcmap.c */\ gs_private_st_ptrs1(st_pattern_cache, gx_pattern_cache,\ "gx_pattern_cache", pattern_cache_enum, pattern_cache_reloc, tiles) #endif /* gxpcache_INCLUDED */