blob: 36808042d783c89e11c45b13def1a0bf406326f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* Copyright (C) 1997 Aladdin Enterprises. All rights reserved.
This software is licensed to a single customer by Artifex Software Inc.
under the terms of a specific OEM agreement.
*/
/*$RCSfile$ $Revision$ */
/* 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 */
|