evas/async_render: use image scalecache

SVN revision: 82890
This commit is contained in:
Ulisses Furquim 2013-01-16 16:07:46 +00:00
parent 73667b025c
commit 09f342fdeb
6 changed files with 194 additions and 153 deletions

View File

@ -55,6 +55,15 @@ EAPI void
int src_region_w, int src_region_h, int src_region_w, int src_region_h,
int dst_region_x, int dst_region_y, int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h); int dst_region_w, int dst_region_h);
EAPI Eina_Bool
evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
int src_region_w, int src_region_h,
int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h,
Evas_Common_Scale_In_To_Out_Clip_Cb cb_sample,
Evas_Common_Scale_In_To_Out_Clip_Cb cb_smooth);
EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im); EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im);

View File

@ -495,19 +495,22 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
//static int noscales = 0; //static int noscales = 0;
#endif #endif
EAPI void EAPI Eina_Bool
evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst, evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth, RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y, int src_region_x, int src_region_y,
int src_region_w, int src_region_h, int src_region_w, int src_region_h,
int dst_region_x, int dst_region_y, int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h) int dst_region_w, int dst_region_h,
Evas_Common_Scale_In_To_Out_Clip_Cb cb_sample,
Evas_Common_Scale_In_To_Out_Clip_Cb cb_smooth)
{ {
#ifdef SCALECACHE #ifdef SCALECACHE
RGBA_Image *im = (RGBA_Image *)ie; RGBA_Image *im = (RGBA_Image *)ie;
Scaleitem *sci; Scaleitem *sci;
int didpop = 0; int didpop = 0;
int dounload = 0; int dounload = 0;
Eina_Bool ret = EINA_FALSE;
/* /*
static int i = 0; static int i = 0;
@ -520,7 +523,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
} }
*/ */
if ((dst_region_w == 0) || (dst_region_h == 0) || if ((dst_region_w == 0) || (dst_region_h == 0) ||
(src_region_w == 0) || (src_region_h == 0)) return; (src_region_w == 0) || (src_region_h == 0)) return EINA_FALSE;
LKL(im->cache.lock); LKL(im->cache.lock);
if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h)) if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
{ {
@ -539,13 +542,13 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
LKU(im->cache.lock); LKU(im->cache.lock);
if (im->image.data) if (im->image.data)
{ {
evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, return cb_sample(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
} }
return; return EINA_FALSE;
} }
LKL(cache_lock); LKL(cache_lock);
sci = _sci_find(im, dc, smooth, sci = _sci_find(im, dc, smooth,
@ -570,19 +573,19 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
if (im->image.data) if (im->image.data)
{ {
if (smooth) if (smooth)
evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, return cb_smooth(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
else else
evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, return cb_sample(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
} }
return; return EINA_FALSE;
} }
if (sci->populate_me) if (sci->populate_me)
{ {
@ -658,15 +661,13 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
if (im->image.data) if (im->image.data)
{ {
if (smooth) if (smooth)
evas_common_scale_rgba_in_to_out_clip_smooth ret = cb_smooth(im, sci->im, ct,
(im, sci->im, ct,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
0, 0, 0, 0,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
else else
evas_common_scale_rgba_in_to_out_clip_sample ret = cb_sample(im, sci->im, ct,
(im, sci->im, ct,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
0, 0, 0, 0,
@ -730,8 +731,7 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
} }
// INF("use cached!"); // INF("use cached!");
LKU(im->cache.lock); LKU(im->cache.lock);
evas_common_scale_rgba_in_to_out_clip_sample ret |= cb_sample(sci->im, dst, dc,
(sci->im, dst, dc,
0, 0, 0, 0,
dst_region_w, dst_region_h, dst_region_w, dst_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
@ -793,21 +793,26 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
if (im->image.data) if (im->image.data)
{ {
if (smooth) if (smooth)
evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, ret |= cb_smooth(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
else else
evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, ret |= cb_sample(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
} }
} }
return ret;
#else #else
RGBA_Image *im = (RGBA_Image *)ie; RGBA_Image *im = (RGBA_Image *)ie;
if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
{ {
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
@ -821,17 +826,36 @@ evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
if (im->image.data) if (im->image.data)
{ {
if (smooth) if (smooth)
evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, return cb_smooth(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
else else
evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, return cb_sample(im, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,
dst_region_w, dst_region_h); dst_region_w, dst_region_h);
} }
return EINA_FALSE;
#endif #endif
} }
EAPI void
evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
int src_region_w, int src_region_h,
int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h)
{
evas_common_rgba_image_scalecache_do_cbs(
ie, dst, dc, smooth,
src_region_x, src_region_y, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h,
evas_common_scale_rgba_in_to_out_clip_sample,
evas_common_scale_rgba_in_to_out_clip_smooth);
}

View File

@ -6,8 +6,8 @@ typedef Eina_Bool (*Evas_Common_Scale_In_To_Out_Clip_Cb)(RGBA_Image *src, RGBA_I
EAPI void evas_common_scale_init (void); EAPI void evas_common_scale_init (void);
EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_cb (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, Evas_Common_Scale_In_To_Out_Clip_Cb cb); EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_cb (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, Evas_Common_Scale_In_To_Out_Clip_Cb cb);
EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
EAPI void evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
EAPI void evas_common_rgba_image_scalecache_dump(void); EAPI void evas_common_rgba_image_scalecache_dump(void);

View File

@ -3,7 +3,7 @@
static Eina_Bool scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); static Eina_Bool scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
EAPI void EAPI Eina_Bool
evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst, evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc, RGBA_Draw_Context *dc,
int src_region_x, int src_region_y, int src_region_x, int src_region_y,
@ -11,7 +11,7 @@ evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
int dst_region_x, int dst_region_y, int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h) int dst_region_w, int dst_region_h)
{ {
evas_common_scale_rgba_in_to_out_clip_cb return evas_common_scale_rgba_in_to_out_clip_cb
(src, dst, dc, (src, dst, dc,
src_region_x, src_region_y, src_region_w, src_region_h, src_region_x, src_region_y, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h,

View File

@ -180,7 +180,7 @@ evas_common_scale_rgba_in_to_out_clip_smooth_c(RGBA_Image *src, RGBA_Image *dst,
return EINA_TRUE; return EINA_TRUE;
} }
EAPI void EAPI Eina_Bool
evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst, evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc, RGBA_Draw_Context *dc,
int src_region_x, int src_region_y, int src_region_x, int src_region_y,
@ -199,7 +199,7 @@ evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
#endif #endif
cb = evas_common_scale_rgba_in_to_out_clip_smooth_c; cb = evas_common_scale_rgba_in_to_out_clip_smooth_c;
evas_common_scale_rgba_in_to_out_clip_cb(src, dst, dc, return evas_common_scale_rgba_in_to_out_clip_cb(src, dst, dc,
src_region_x, src_region_y, src_region_x, src_region_y,
src_region_w, src_region_h, src_region_w, src_region_h,
dst_region_x, dst_region_y, dst_region_x, dst_region_y,

View File

@ -1187,13 +1187,13 @@ _draw_thread_image_draw(void *data)
} }
static Eina_Bool static Eina_Bool
_image_draw_thread_cmd(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth) _image_draw_thread_cmd(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth)
{ {
Evas_Thread_Command_Image *cr; Evas_Thread_Command_Image *cr;
int clip_x, clip_y, clip_w, clip_h; int clip_x, clip_y, clip_w, clip_h;
if ((dst_region_w <= 0) || (dst_region_h <= 0)) return EINA_FALSE; if ((dst_w <= 0) || (dst_h <= 0)) return EINA_FALSE;
if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, if (!(RECTS_INTERSECT(dst_x, dst_y, dst_w, dst_h,
0, 0, dst->cache_entry.w, dst->cache_entry.h))) return EINA_FALSE; 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return EINA_FALSE;
cr = eina_mempool_malloc(_mp_command_image, sizeof (Evas_Thread_Command_Image)); cr = eina_mempool_malloc(_mp_command_image, sizeof (Evas_Thread_Command_Image));
@ -1201,8 +1201,8 @@ _image_draw_thread_cmd(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc,
cr->image = src; cr->image = src;
cr->surface = dst; cr->surface = dst;
EINA_RECTANGLE_SET(&cr->src, src_region_x, src_region_y, src_region_w, src_region_h); EINA_RECTANGLE_SET(&cr->src, src_x, src_y, src_w, src_h);
EINA_RECTANGLE_SET(&cr->dst, dst_region_x, dst_region_y, dst_region_w, dst_region_h); EINA_RECTANGLE_SET(&cr->dst, dst_x, dst_y, dst_w, dst_h);
if (dc->clip.use) if (dc->clip.use)
{ {
@ -1231,25 +1231,41 @@ _image_draw_thread_cmd(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc,
} }
static Eina_Bool static Eina_Bool
_image_draw_thread_cmd_smooth(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h) _image_draw_thread_cmd_smooth(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h)
{ {
return _image_draw_thread_cmd return _image_draw_thread_cmd(src, dst, dc,
(src, dst, dc, src_x, src_y, src_w, src_h,
src_region_x, src_region_y, src_region_w, src_region_h, dst_x, dst_y, dst_w, dst_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h,
1); 1);
} }
static Eina_Bool static Eina_Bool
_image_draw_thread_cmd_sample(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h) _image_draw_thread_cmd_sample(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h)
{ {
return _image_draw_thread_cmd return _image_draw_thread_cmd(src, dst, dc,
(src, dst, dc, src_x, src_y, src_w, src_h,
src_region_x, src_region_y, src_region_w, src_region_h, dst_x, dst_y, dst_w, dst_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h,
0); 0);
} }
static Eina_Bool
_image_thr_cb_smooth(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h)
{
return evas_common_scale_rgba_in_to_out_clip_cb(src, dst, dc,
src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h,
_image_draw_thread_cmd_smooth);
}
static Eina_Bool
_image_thr_cb_sample(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h)
{
return evas_common_scale_rgba_in_to_out_clip_cb(src, dst, dc,
src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h,
_image_draw_thread_cmd_sample);
}
static Eina_Bool static Eina_Bool
eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async) eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async)
{ {
@ -1272,20 +1288,16 @@ eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image
if (!im->cache_entry.flags.loaded) return EINA_FALSE; if (!im->cache_entry.flags.loaded) return EINA_FALSE;
} }
evas_common_image_colorspace_normalize(im); evas_common_rgba_image_scalecache_prepare(image, surface, context, smooth,
src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h);
if (smooth) return evas_common_rgba_image_scalecache_do_cbs(image, surface,
return evas_common_scale_rgba_in_to_out_clip_cb context, smooth,
(image, surface, context,
src_x, src_y, src_w, src_h, src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h, dst_x, dst_y, dst_w, dst_h,
_image_draw_thread_cmd_smooth); _image_thr_cb_sample,
else _image_thr_cb_smooth);
return evas_common_scale_rgba_in_to_out_clip_cb
(image, surface, context,
src_x, src_y, src_w, src_h,
dst_x, dst_y, dst_w, dst_h,
_image_draw_thread_cmd_sample);
} }
#ifdef BUILD_PIPE_RENDER #ifdef BUILD_PIPE_RENDER
else if ((cpunum > 1)) else if ((cpunum > 1))
@ -1359,13 +1371,13 @@ image_loaded:
} }
static void static void
_map_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth) _map_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth)
{ {
int clip_x, clip_y, clip_w, clip_h; int clip_x, clip_y, clip_w, clip_h;
DATA32 mul_col; DATA32 mul_col;
if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; if ((dst_w <= 0) || (dst_h <= 0)) return;
if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, if (!(RECTS_INTERSECT(dst_x, dst_y, dst_w, dst_h,
0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return;
if (dc->clip.use) if (dc->clip.use)
@ -1385,38 +1397,34 @@ _map_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src
mul_col = dc->mul.use ? dc->mul.col : 0xffffffff; mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
if (smooth) if (smooth)
evas_common_scale_rgba_smooth_draw evas_common_scale_rgba_smooth_draw(src, dst,
(src, dst,
clip_x, clip_y, clip_w, clip_h, clip_x, clip_y, clip_w, clip_h,
mul_col, dc->render_op, mul_col, dc->render_op,
src_region_x, src_region_y, src_region_w, src_region_h, src_x, src_y, src_w, src_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h); dst_x, dst_y, dst_w, dst_h);
else else
evas_common_scale_rgba_sample_draw evas_common_scale_rgba_sample_draw(src, dst,
(src, dst,
clip_x, clip_y, clip_w, clip_h, clip_x, clip_y, clip_w, clip_h,
mul_col, dc->render_op, mul_col, dc->render_op,
src_region_x, src_region_y, src_region_w, src_region_h, src_x, src_y, src_w, src_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h); dst_x, dst_y, dst_w, dst_h);
} }
static Eina_Bool static Eina_Bool
_map_image_sample_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h) _map_image_sample_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h)
{ {
_map_image_draw(src, dst, dc, _map_image_draw(src, dst, dc,
src_region_x, src_region_y, src_region_w, src_region_h, src_x, src_y, src_w, src_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h, dst_x, dst_y, dst_w, dst_h, 0);
0);
return EINA_TRUE; return EINA_TRUE;
} }
static Eina_Bool static Eina_Bool
_map_image_smooth_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h) _map_image_smooth_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h)
{ {
_map_image_draw(src, dst, dc, _map_image_draw(src, dst, dc,
src_region_x, src_region_y, src_region_w, src_region_h, src_x, src_y, src_w, src_h,
dst_region_x, dst_region_y, dst_region_w, dst_region_h, dst_x, dst_y, dst_w, dst_h, 1);
1);
return EINA_TRUE; return EINA_TRUE;
} }
@ -1484,7 +1492,7 @@ _draw_thread_map_draw(void *data)
while ((m->count > 4) && (m->count - offset >= 3)); while ((m->count > 4) && (m->count - offset >= 3));
free_out: free_out:
free(m); // FIXME: allocating and destroying map do have perf impact... ref counting would be better free(m);
eina_mempool_free(_mp_command_map, map); eina_mempool_free(_mp_command_map, map);
} }