Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/modules/loaders/xpm
Modified Files:
evas_image_load_xpm.c
Log Message:
cedric's cache changes patch
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/xpm/evas_image_load_xpm.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_image_load_xpm.c 28 Oct 2007 10:08:32 -0000 1.13
+++ evas_image_load_xpm.c 12 Apr 2008 00:32:30 -0000 1.14
@@ -249,20 +249,8 @@
return 0;
}
}
- if (!im->image)
- {
- im->image = evas_common_image_surface_new(im);
- if (!im->image)
- {
- free(cmap);
- free(line);
- fclose(f);
- xpm_parse_done();
- return 0;
- }
- }
- im->image->w = w;
- im->image->h = h;
+ im->cache_entry.w = w;
+ im->cache_entry.h = h;
j = 0;
context++;
@@ -376,22 +364,16 @@
if (load_data)
{
- if (im->image->data)
- evas_common_image_surface_dealloc(im->image);
- im->image->w = w;
- im->image->h = h;
- evas_common_image_surface_alloc(im->image);
- if (!im->image->data)
+ evas_cache_image_surface_alloc(&im->cache_entry,
w, h);
+ if (!im->image.data)
{
- evas_common_image_surface_free(im->image);
- im->image = NULL;
free(cmap);
free(line);
fclose(f);
xpm_parse_done();
return 0;
}
- ptr = im->image->data;
+ ptr = im->image.data;
end = ptr + (w * h);
pixels = w * h;
}
@@ -612,7 +594,7 @@
if (!tl) break;
line = tl;
}
- if (((ptr) && ((ptr - im->image->data) >= (w * h * sizeof(DATA32)))) ||
+ if (((ptr) && ((ptr - im->image.data) >= (w * h * sizeof(DATA32)))) ||
((context > 1) && (count >= pixels)))
break;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs