forked from enlightenment/efl
evas/cserve2: Add alpha flag to Image_data
This commit is contained in:
parent
1e82480c9a
commit
25d71f8236
|
@ -146,6 +146,7 @@ struct _Slave_Msg_Image_Load {
|
|||
|
||||
struct _Slave_Msg_Image_Loaded {
|
||||
int w, h;
|
||||
Eina_Bool alpha : 1;
|
||||
Eina_Bool alpha_sparse : 1;
|
||||
};
|
||||
|
||||
|
|
|
@ -508,6 +508,7 @@ _image_loaded_msg_create(Image_Entry *ientry, Image_Data *idata, int *size)
|
|||
msg->alpha_sparse = idata->alpha_sparse;
|
||||
msg->image.w = idata->w;
|
||||
msg->image.h = idata->h;
|
||||
msg->alpha = idata->alpha;
|
||||
|
||||
if (idata->shm_id)
|
||||
{
|
||||
|
@ -806,18 +807,8 @@ _scaling_do(Shm_Handle *scale_shm, Image_Data *idata, Image_Entry *original)
|
|||
{
|
||||
char *scale_map, *orig_map;
|
||||
void *src_data, *dst_data;
|
||||
File_Data *fd;
|
||||
Image_Data *orig_idata;
|
||||
|
||||
#warning FIXME Remove this call, add alpha flag to Image_Data
|
||||
fd = _file_data_find(idata->file_id);
|
||||
if (!fd)
|
||||
{
|
||||
ERR("Could not find file data %u for image %u",
|
||||
idata->file_id, idata->id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
orig_idata = _image_data_find(original->base.id);
|
||||
if (!orig_idata)
|
||||
{
|
||||
|
@ -858,7 +849,7 @@ _scaling_do(Shm_Handle *scale_shm, Image_Data *idata, Image_Entry *original)
|
|||
idata->opts.scale_load.src_w, idata->opts.scale_load.src_h,
|
||||
0, 0,
|
||||
idata->opts.scale_load.dst_w, idata->opts.scale_load.dst_h,
|
||||
fd->alpha, idata->opts.scale_load.smooth);
|
||||
idata->alpha, idata->opts.scale_load.smooth);
|
||||
|
||||
cserve2_shm_unmap(original->shm);
|
||||
cserve2_shm_unmap(scale_shm);
|
||||
|
@ -906,6 +897,7 @@ _load_request_response(Image_Entry *ientry,
|
|||
_entry_load_finish(ASENTRY(ientry));
|
||||
ASENTRY(ientry)->request = NULL;
|
||||
|
||||
idata->alpha = resp->alpha;
|
||||
idata->alpha_sparse = resp->alpha_sparse;
|
||||
if (!idata->doload)
|
||||
DBG("Entry %d loaded by speculative preload.", idata->id);
|
||||
|
|
|
@ -456,6 +456,7 @@ image_load(const char *file, const char *key, const char *shmfile,
|
|||
|
||||
result->w = property.w;
|
||||
result->h = property.h;
|
||||
result->alpha = property.alpha;
|
||||
|
||||
if (property.alpha && property.premul)
|
||||
{
|
||||
|
|
|
@ -93,6 +93,7 @@ struct _Msg_Loaded {
|
|||
struct {
|
||||
unsigned int w, h; // Real dimensions of this image. May differ from Msg_Opened::image::{w,h} after scaling.
|
||||
} image;
|
||||
Eina_Bool alpha : 1;
|
||||
Eina_Bool alpha_sparse : 1;
|
||||
};
|
||||
|
||||
|
@ -358,6 +359,7 @@ struct _Image_Data {
|
|||
string_t shm_id;
|
||||
Evas_Image_Load_Opts opts;
|
||||
uint32_t w, h;
|
||||
Eina_Bool alpha : 1;
|
||||
Eina_Bool alpha_sparse : 1;
|
||||
Eina_Bool unused : 1;
|
||||
Eina_Bool doload : 1;
|
||||
|
|
Loading…
Reference in New Issue