Branch: Tag:

2000-09-04

2000-09-04 06:49:35 by Per Hedbor <ph@opera.com>

Here be threads

Rev: server/font_handlers/imagedir.pike:1.3
Rev: server/font_handlers/ttf.pike:1.4

3: Inside #if constant(has_Image_TTF)
     #if constant(has_Image_TTF)   #include <config.h> - constant cvs_version = "$Id: ttf.pike,v 1.3 2000/09/04 05:09:44 per Exp $"; + constant cvs_version = "$Id: ttf.pike,v 1.4 2000/09/04 06:49:35 per Exp $";      constant name = "TTF fonts";   constant doc = "True Type font loader.";
165:    }   }    + #ifdef THREADS + Thread.Mutex lock = Thread.Mutex(); + #endif +    array available_fonts()   { -  + #ifdef THREADS +  object key = lock->lock(); + #endif    if( !ttf_font_names_cache ) build_font_names_cache( );    return indices( ttf_font_names_cache );   }
193:      array(string) has_font( string name, int size )   { + #ifdef THREADS +  object key = lock->lock(); + #endif    if( !ttf_font_names_cache )    build_font_names_cache( );    if( ttf_font_names_cache[ name ] )