summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>1998-04-14 14:16:10 +0000
committerPierre Weis <Pierre.Weis@inria.fr>1998-04-14 14:16:10 +0000
commit13637589b2d0987d72eb97e9418f6a8b5bdaf98c (patch)
treea250c63989bcd53d2c0f23a2797c95e7c528c93c
parente08ab0bb946f085f6c0e82053c9378d1a9846379 (diff)
Augmentation de la taille du cache des couleurs jusqu'à 256 couleurs.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1915 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/graph/color.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/graph/color.c b/otherlibs/graph/color.c
index 4e7c12e95..9a9ed7b54 100644
--- a/otherlibs/graph/color.c
+++ b/otherlibs/graph/color.c
@@ -20,11 +20,11 @@ struct color_cache_entry {
unsigned long pixel; /* Pixel value */
};
-#define Color_cache_size 64
+#define Color_cache_size 256
static struct color_cache_entry color_cache[Color_cache_size];
#define Empty (-1)
#define Hash_rgb(r,g,b) \
- ((((r) & 0xC0) >> 2) + (((g) & 0xC0) >> 4) + (((b) & 0xC0) >> 6))
+ (((r) & 0xE0) + (((g) & 0xE0) >> 3) + (((b) & 0xC0) >> 6))
void gr_init_color_cache(void)
{