From: <enl...@li...> - 2004-04-10 02:39:59
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/imlib2 Dir : e17/libs/imlib2/src Modified Files: ximage.c Log Message: actually use cache in 32bpp/24bpp =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/imlib2/src/ximage.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ximage.c 7 Nov 2003 07:39:32 -0000 1.6 +++ ximage.c 10 Apr 2004 02:26:37 -0000 1.7 @@ -174,12 +174,18 @@ /* go thru the current image list */ for (i = 0; i < list_num; i++) { + int depth_ok = 0; + /* if the image has the same depth, width and height - recycle it */ /* as long as its not used */ - if ((list_xim[i]->bits_per_pixel == depth) && - (list_xim[i]->width >= w) && (list_xim[i]->height >= h) && - /* (list_d[i] == d) && */ - (!list_used[i])) + if ( (list_xim[i]->bits_per_pixel == depth) || + ((list_xim[i]->bits_per_pixel == 32) && (depth == 24)) ) + depth_ok = 1; + if ( depth_ok && + (list_xim[i]->width >= w) && + (list_xim[i]->height >= h) && + /* (list_d[i] == d) && */ + (!list_used[i])) { /* mark it as used */ list_used[i] = 1; |