parent
7404d31433
commit
47df5c8909
14
src/ximage.c
14
src/ximage.c
|
@ -174,12 +174,18 @@ __imlib_ProduceXImage(Display * d, Visual * v, int depth, int w, int h,
|
||||||
/* go thru the current image list */
|
/* go thru the current image list */
|
||||||
for (i = 0; i < list_num; i++)
|
for (i = 0; i < list_num; i++)
|
||||||
{
|
{
|
||||||
|
int depth_ok = 0;
|
||||||
|
|
||||||
/* if the image has the same depth, width and height - recycle it */
|
/* if the image has the same depth, width and height - recycle it */
|
||||||
/* as long as its not used */
|
/* as long as its not used */
|
||||||
if ((list_xim[i]->bits_per_pixel == depth) &&
|
if ( (list_xim[i]->bits_per_pixel == depth) ||
|
||||||
(list_xim[i]->width >= w) && (list_xim[i]->height >= h) &&
|
((list_xim[i]->bits_per_pixel == 32) && (depth == 24)) )
|
||||||
/* (list_d[i] == d) && */
|
depth_ok = 1;
|
||||||
(!list_used[i]))
|
if ( depth_ok &&
|
||||||
|
(list_xim[i]->width >= w) &&
|
||||||
|
(list_xim[i]->height >= h) &&
|
||||||
|
/* (list_d[i] == d) && */
|
||||||
|
(!list_used[i]))
|
||||||
{
|
{
|
||||||
/* mark it as used */
|
/* mark it as used */
|
||||||
list_used[i] = 1;
|
list_used[i] = 1;
|
||||||
|
|
Loading…
Reference in New Issue