Enlightenment CVS committal Author : cedric Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/include Modified Files: evas_common.h evas_private.h Log Message: * Make RGBA_IMAGE_HAS_ALPHA and RGBA_IMAGE_ALPHA_SPARSE part of Image_Entry flag structure. This fix a bug with 16 bpp software engine. * Change image loader module API to take any Image_Entry. Same goes for evas_common_image_premul and evas_common_image_set_alpha_sparse. * Use new eet API: eet_data_image_read_to_surface. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v retrieving revision 1.103 retrieving revision 1.104 diff -u -3 -r1.103 -r1.104 --- evas_common.h 30 May 2008 13:55:51 -0000 1.103 +++ evas_common.h 3 Jun 2008 09:09:35 -0000 1.104 @@ -135,6 +135,7 @@ typedef struct _Evas_Hash_El Evas_Hash_El; typedef struct _Image_Entry Image_Entry; +typedef struct _Image_Entry_Flags Image_Entry_Flags; typedef struct _Engine_Image_Entry Engine_Image_Entry; typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts; @@ -193,14 +194,14 @@ typedef enum _RGBA_Image_Flags { RGBA_IMAGE_NOTHING = (0), - RGBA_IMAGE_HAS_ALPHA = (1 << 0), +/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */ RGBA_IMAGE_IS_DIRTY = (1 << 1), RGBA_IMAGE_INDEXED = (1 << 2), RGBA_IMAGE_ALPHA_ONLY = (1 << 3), RGBA_IMAGE_ALPHA_TILES = (1 << 4), - RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), - RGBA_IMAGE_LOADED = (1 << 6), - RGBA_IMAGE_NEED_DATA = (1 << 7) +/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */ +/* RGBA_IMAGE_LOADED = (1 << 6), */ +/* RGBA_IMAGE_NEED_DATA = (1 << 7) */ } RGBA_Image_Flags; typedef enum _Convert_Pal_Mode @@ -267,6 +268,18 @@ int w, h; // if > 0 use this }; +struct _Image_Entry_Flags +{ + Evas_Bool loaded : 1; + Evas_Bool dirty : 1; + Evas_Bool activ : 1; + Evas_Bool need_data : 1; + Evas_Bool lru_nodata : 1; + Evas_Bool cached : 1; + Evas_Bool alpha : 1; + Evas_Bool alpha_sparse : 1; +}; + struct _Image_Entry { Evas_Object_List _list_data; @@ -281,16 +294,6 @@ time_t timestamp; time_t laststat; - struct - { - Evas_Bool loaded : 1; - Evas_Bool dirty : 1; - Evas_Bool activ : 1; - Evas_Bool need_data : 1; - Evas_Bool lru_nodata : 1; - Evas_Bool cached : 1; - } flags; - int references; unsigned char scale; @@ -305,6 +308,14 @@ int w; int h; } allocated; + + struct + { + void *module; + void *loader; + } info; + + Image_Entry_Flags flags; }; struct _Engine_Image_Entry @@ -432,8 +443,8 @@ RGBA_Image_Flags flags; struct { - void *module; - void *loader; +/* void *module; */ +/* void *loader; */ /* char *real_file; */ char *comment; // int format; @@ -610,11 +621,11 @@ RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); - RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(int src_flags, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst); - RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(int src_flags, DATA32 col, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst); - RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(int src_flags, RGBA_Image *dst); + RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); }; #define EVAS_RECT_SPLIT 1 @@ -745,8 +756,10 @@ Image_Entry *(*alloc)(void); void (*dealloc)(Image_Entry *im); + /* The cache provide some helpers for surface manipulation. */ int (*surface_alloc)(Image_Entry *im, int w, int h); void (*surface_delete)(Image_Entry *im); + DATA32 *(*surface_pixels)(Image_Entry *im); /* The cache is doing the allocation and deallocation, you must just do the rest. */ int (*constructor)(Image_Entry *im); @@ -933,11 +946,11 @@ RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (int src_flags, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get (DATA32 col, RGBA_Image *dst, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (int src_flags, DATA32 col, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get (DATA32 col, RGBA_Image *dst, int op); -RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (int src_flags, RGBA_Image *dst, int op); +RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse); @@ -1088,8 +1101,8 @@ EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im); EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im); EAPI void evas_common_image_cache_free (void); /*2*/ -EAPI void evas_common_image_premul (RGBA_Image *im); /*2*/ -EAPI void evas_common_image_set_alpha_sparse (RGBA_Image *im); /*2*/ +EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/ +EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/ /* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */ /* EAPI RGBA_Image *evas_common_image_create (int w, int h); */ EAPI RGBA_Image *evas_common_image_new (void); @@ -1299,6 +1312,7 @@ EAPI Image_Entry* evas_cache_image_dirty(Image_Entry *im, int x, int y, int w, int h); EAPI void evas_cache_image_load_data(Image_Entry *im); EAPI void evas_cache_image_surface_alloc(Image_Entry *im, int w, int h); +EAPI DATA32* evas_cache_image_pixels(Image_Entry *im); EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace); EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace); EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace); =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v retrieving revision 1.105 retrieving revision 1.106 diff -u -3 -r1.105 -r1.106 --- evas_private.h 26 May 2008 13:17:12 -0000 1.105 +++ evas_private.h 3 Jun 2008 09:09:35 -0000 1.106 @@ -674,8 +674,8 @@ struct _Evas_Image_Load_Func { - int (*file_head) (RGBA_Image *im, const char *file, const char *key); - int (*file_data) (RGBA_Image *im, const char *file, const char *key); + int (*file_head) (Image_Entry *ie, const char *file, const char *key); + int (*file_data) (Image_Entry *ie, const char *file, const char *key); }; struct _Evas_Image_Save_Func ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs