typedef struct _Client Client;
-struct _Image_Load_Opts {
- unsigned int w, h;
- unsigned int rx, ry, rw, rh;
- unsigned int scale_down_by;
- double dpi;
- Eina_Bool orientation;
-};
-
-typedef struct _Image_Load_Opts Image_Load_Opts;
-
typedef enum {
IMAGE_OPEN,
IMAGE_LOAD,
struct _Slave_Msg_Image_Load {
int w, h;
- Image_Load_Opts opts;
+ Evas_Image_Load_Opts opts;
struct {
int mmap_offset;
int image_offset;
msg.w = i->file->w;
msg.h = i->file->h;
msg.alpha = i->file->alpha;
+
+ // NOTE: Not passing scale_load options
msg.opts.w = i->opts.w;
msg.opts.h = i->opts.h;
- msg.opts.rx = i->opts.region.x;
- msg.opts.ry = i->opts.region.y;
- msg.opts.rw = i->opts.region.w;
- msg.opts.rh = i->opts.region.h;
+ msg.opts.region = i->opts.region;
msg.opts.scale_down_by = i->opts.scale_down_by;
msg.opts.dpi = i->opts.dpi;
msg.opts.orientation = i->opts.orientation;
munmap(map, length);
}
-static void
-_image_load_opts_copy(Evas_Image_Load_Opts *load_opts, Image_Load_Opts *opts)
-{
- memset(load_opts, 0, sizeof (Evas_Image_Load_Opts));
- if (opts)
- {
- load_opts->w = opts->w;
- load_opts->h = opts->h;
- load_opts->dpi = opts->dpi;
- load_opts->region.x = opts->rx;
- load_opts->region.y = opts->ry;
- load_opts->region.w = opts->rw;
- load_opts->region.h = opts->rh;
- load_opts->orientation = opts->orientation;
- load_opts->scale_down_by = opts->scale_down_by;
- }
- // Not set here: struct load_opts.scale_load
-}
-
static void *
_image_file_open(Eina_File *fd, Eina_Stringshare *key, Evas_Image_Load_Opts *load_opts,
Evas_Module *module, Evas_Image_Property *property,
Evas_Module *module;
Eina_File *fd;
Evas_Image_Load_Func *funcs = NULL;
- Image_Load_Opts *opts = ¶ms->opts;
- Evas_Image_Load_Opts load_opts;
+ Evas_Image_Load_Opts *opts = ¶ms->opts;
Evas_Image_Property property;
Evas_Image_Animated animated;
Error_Type ret = CSERVE2_GENERIC;
property.h = params->h;
skey = eina_stringshare_add(key);
- _image_load_opts_copy(&load_opts, opts);
- loader_data = _image_file_open(fd, skey, &load_opts, module, &property, &animated, &funcs);
+ loader_data = _image_file_open(fd, skey, opts, module, &property, &animated, &funcs);
if (!loader_data)
{
printf("LOAD failed at %s:%d: could not open image %s:%s\n",