summaryrefslogtreecommitdiff
path: root/src/bin/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-09-24 18:18:53 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:15 +0900
commit25d71f823668ecb1865c61f306890fee654b9d32 (patch)
tree3f7ffe566f91fb7433ef3644f9bed99733e025fd /src/bin/evas
parent1e82480c9a074163ec6788a8a60ead403f7b0658 (diff)
evas/cserve2: Add alpha flag to Image_data
Diffstat (limited to 'src/bin/evas')
-rw-r--r--src/bin/evas/evas_cserve2.h1
-rw-r--r--src/bin/evas/evas_cserve2_cache.c14
-rw-r--r--src/bin/evas/evas_cserve2_slave.c1
3 files changed, 5 insertions, 11 deletions
diff --git a/src/bin/evas/evas_cserve2.h b/src/bin/evas/evas_cserve2.h
index 2a3a40eb67..158eefda3d 100644
--- a/src/bin/evas/evas_cserve2.h
+++ b/src/bin/evas/evas_cserve2.h
@@ -146,6 +146,7 @@ struct _Slave_Msg_Image_Load {
146 146
147struct _Slave_Msg_Image_Loaded { 147struct _Slave_Msg_Image_Loaded {
148 int w, h; 148 int w, h;
149 Eina_Bool alpha : 1;
149 Eina_Bool alpha_sparse : 1; 150 Eina_Bool alpha_sparse : 1;
150}; 151};
151 152
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index e86643df54..d0589dd4b8 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -508,6 +508,7 @@ _image_loaded_msg_create(Image_Entry *ientry, Image_Data *idata, int *size)
508 msg->alpha_sparse = idata->alpha_sparse; 508 msg->alpha_sparse = idata->alpha_sparse;
509 msg->image.w = idata->w; 509 msg->image.w = idata->w;
510 msg->image.h = idata->h; 510 msg->image.h = idata->h;
511 msg->alpha = idata->alpha;
511 512
512 if (idata->shm_id) 513 if (idata->shm_id)
513 { 514 {
@@ -806,18 +807,8 @@ _scaling_do(Shm_Handle *scale_shm, Image_Data *idata, Image_Entry *original)
806{ 807{
807 char *scale_map, *orig_map; 808 char *scale_map, *orig_map;
808 void *src_data, *dst_data; 809 void *src_data, *dst_data;
809 File_Data *fd;
810 Image_Data *orig_idata; 810 Image_Data *orig_idata;
811 811
812#warning FIXME Remove this call, add alpha flag to Image_Data
813 fd = _file_data_find(idata->file_id);
814 if (!fd)
815 {
816 ERR("Could not find file data %u for image %u",
817 idata->file_id, idata->id);
818 return -1;
819 }
820
821 orig_idata = _image_data_find(original->base.id); 812 orig_idata = _image_data_find(original->base.id);
822 if (!orig_idata) 813 if (!orig_idata)
823 { 814 {
@@ -858,7 +849,7 @@ _scaling_do(Shm_Handle *scale_shm, Image_Data *idata, Image_Entry *original)
858 idata->opts.scale_load.src_w, idata->opts.scale_load.src_h, 849 idata->opts.scale_load.src_w, idata->opts.scale_load.src_h,
859 0, 0, 850 0, 0,
860 idata->opts.scale_load.dst_w, idata->opts.scale_load.dst_h, 851 idata->opts.scale_load.dst_w, idata->opts.scale_load.dst_h,
861 fd->alpha, idata->opts.scale_load.smooth); 852 idata->alpha, idata->opts.scale_load.smooth);
862 853
863 cserve2_shm_unmap(original->shm); 854 cserve2_shm_unmap(original->shm);
864 cserve2_shm_unmap(scale_shm); 855 cserve2_shm_unmap(scale_shm);
@@ -906,6 +897,7 @@ _load_request_response(Image_Entry *ientry,
906 _entry_load_finish(ASENTRY(ientry)); 897 _entry_load_finish(ASENTRY(ientry));
907 ASENTRY(ientry)->request = NULL; 898 ASENTRY(ientry)->request = NULL;
908 899
900 idata->alpha = resp->alpha;
909 idata->alpha_sparse = resp->alpha_sparse; 901 idata->alpha_sparse = resp->alpha_sparse;
910 if (!idata->doload) 902 if (!idata->doload)
911 DBG("Entry %d loaded by speculative preload.", idata->id); 903 DBG("Entry %d loaded by speculative preload.", idata->id);
diff --git a/src/bin/evas/evas_cserve2_slave.c b/src/bin/evas/evas_cserve2_slave.c
index 963a1dba76..43fc3a5b19 100644
--- a/src/bin/evas/evas_cserve2_slave.c
+++ b/src/bin/evas/evas_cserve2_slave.c
@@ -456,6 +456,7 @@ image_load(const char *file, const char *key, const char *shmfile,
456 456
457 result->w = property.w; 457 result->w = property.w;
458 result->h = property.h; 458 result->h = property.h;
459 result->alpha = property.alpha;
459 460
460 if (property.alpha && property.premul) 461 if (property.alpha && property.premul)
461 { 462 {