Changeset 1334 for libcaca/trunk


Ignore:
Timestamp:
Nov 11, 2006, 10:18:42 AM (16 years ago)
Author:
Sam Hocevar
Message:
  • Got rid of very old _cucul_init_dither() function call.
Location:
libcaca/trunk/cucul
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/cucul.c

    r1274 r1334  
    9898    }
    9999
    100     /* FIXME: this shouldn't happen here */
    101     _cucul_init_dither();
    102 
    103100    return cv;
    104101
     
    201198    }
    202199
    203     /* FIXME: this shouldn't be here either (see above) */
    204     _cucul_end_dither();
    205 
    206200    for(f = 0; f < cv->framecount; f++)
    207201    {
  • libcaca/trunk/cucul/cucul_internals.h

    r1333 r1334  
    4646};
    4747
    48 /* Bitmap functions */
    49 extern int _cucul_init_dither(void);
    50 extern int _cucul_end_dither(void);
    51 
    5248/* Canvas functions */
    5349extern int _cucul_set_canvas_size(cucul_canvas_t *, unsigned int, unsigned int);
  • libcaca/trunk/cucul/dither.c

    r1267 r1334  
    4747static unsigned char hsv_distances[LOOKUP_VAL][LOOKUP_SAT][LOOKUP_HUE];
    4848static uint16_t lookup_colors[8];
     49static int lookup_initialised = 0;
    4950
    5051static int const hsv_palette[] =
     
    172173static void get_rgba_default(cucul_dither_t const *, uint8_t *, int, int,
    173174                             unsigned int *);
     175static int init_lookup(void);
    174176
    175177/* Dithering methods */
     
    283285#endif
    284286        return NULL;
     287    }
     288
     289    if(!lookup_initialised)
     290    {
     291        /* XXX: because we do not wish to be thread-safe, there is a slight
     292         * chance that the following code will be executed twice. It is
     293         * totally harmless. */
     294        init_lookup();
     295        lookup_initialised = 1;
    285296    }
    286297
     
    13731384}
    13741385
    1375 #if !defined(_DOXYGEN_SKIP_ME)
    1376 int _cucul_init_dither(void)
     1386/*
     1387 * Lookup tables
     1388 */
     1389static int init_lookup(void)
    13771390{
    13781391    unsigned int v, s, h;
     
    14321445}
    14331446
    1434 int _cucul_end_dither(void)
    1435 {
    1436     return 0;
    1437 }
    1438 #endif /* _DOXYGEN_SKIP_ME */
    1439 
    1440 
Note: See TracChangeset for help on using the changeset viewer.