diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2013-09-24 18:18:53 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2013-10-28 15:47:15 +0900 |
commit | 25d71f823668ecb1865c61f306890fee654b9d32 (patch) | |
tree | 3f7ffe566f91fb7433ef3644f9bed99733e025fd /src | |
parent | 1e82480c9a074163ec6788a8a60ead403f7b0658 (diff) |
evas/cserve2: Add alpha flag to Image_data
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/evas/evas_cserve2.h | 1 | ||||
-rw-r--r-- | src/bin/evas/evas_cserve2_cache.c | 14 | ||||
-rw-r--r-- | src/bin/evas/evas_cserve2_slave.c | 1 | ||||
-rw-r--r-- | src/lib/evas/cserve2/evas_cs2.h | 2 |
4 files changed, 7 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 | ||
147 | struct _Slave_Msg_Image_Loaded { | 147 | struct _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 | { |
diff --git a/src/lib/evas/cserve2/evas_cs2.h b/src/lib/evas/cserve2/evas_cs2.h index 5378790999..7dcd441e99 100644 --- a/src/lib/evas/cserve2/evas_cs2.h +++ b/src/lib/evas/cserve2/evas_cs2.h | |||
@@ -93,6 +93,7 @@ struct _Msg_Loaded { | |||
93 | struct { | 93 | struct { |
94 | unsigned int w, h; // Real dimensions of this image. May differ from Msg_Opened::image::{w,h} after scaling. | 94 | unsigned int w, h; // Real dimensions of this image. May differ from Msg_Opened::image::{w,h} after scaling. |
95 | } image; | 95 | } image; |
96 | Eina_Bool alpha : 1; | ||
96 | Eina_Bool alpha_sparse : 1; | 97 | Eina_Bool alpha_sparse : 1; |
97 | }; | 98 | }; |
98 | 99 | ||
@@ -358,6 +359,7 @@ struct _Image_Data { | |||
358 | string_t shm_id; | 359 | string_t shm_id; |
359 | Evas_Image_Load_Opts opts; | 360 | Evas_Image_Load_Opts opts; |
360 | uint32_t w, h; | 361 | uint32_t w, h; |
362 | Eina_Bool alpha : 1; | ||
361 | Eina_Bool alpha_sparse : 1; | 363 | Eina_Bool alpha_sparse : 1; |
362 | Eina_Bool unused : 1; | 364 | Eina_Bool unused : 1; |
363 | Eina_Bool doload : 1; | 365 | Eina_Bool doload : 1; |