forked from enlightenment/efl
evas/map : set antialias context for map rendering.
This commit is contained in:
parent
d3d306ec5c
commit
215b52ecc1
|
@ -2718,7 +2718,8 @@ evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj,
|
|||
Eina_Bool do_async)
|
||||
{
|
||||
Eina_Bool async_unref;
|
||||
|
||||
obj->layer->evas->engine.func->context_anti_alias_set(data, context,
|
||||
obj->cur->anti_alias);
|
||||
async_unref = ENFN->image_map_draw(data, context,
|
||||
surface, image, m,
|
||||
smooth, level,
|
||||
|
|
|
@ -127,6 +127,8 @@ evas_object_rectangle_render(Evas_Object *eo_obj EINA_UNUSED,
|
|||
obj->cur->cache.clip.g,
|
||||
obj->cur->cache.clip.b,
|
||||
obj->cur->cache.clip.a);
|
||||
obj->layer->evas->engine.func->context_anti_alias_set(output, context,
|
||||
obj->cur->anti_alias);
|
||||
obj->layer->evas->engine.func->context_multiplier_unset(output,
|
||||
context);
|
||||
obj->layer->evas->engine.func->context_render_op_set(output, context,
|
||||
|
|
|
@ -668,7 +668,7 @@ void evas_common_map_rgba_internal_mmx(RGBA_Image *src, RGBA_Image *dst, RGBA_Dr
|
|||
_evas_common_map_rgba_internal_mmx(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, dc->render_op,
|
||||
p, smooth, level);
|
||||
p, smooth, dc->anti_alias, level);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -696,7 +696,7 @@ void evas_common_map_rgba_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_C
|
|||
_evas_common_map_rgba_internal(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, dc->render_op,
|
||||
p, smooth, level);
|
||||
p, smooth, dc->anti_alias, level);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NEON
|
||||
|
@ -724,7 +724,7 @@ void evas_common_map_rgba_internal_neon(RGBA_Image *src, RGBA_Image *dst, RGBA_D
|
|||
_evas_common_map_rgba_internal_neon(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, dc->render_op,
|
||||
p, smooth, level);
|
||||
p, smooth, dc->anti_alias, level);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -856,7 +856,7 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints EINA_UNUSED, RGBA_Map_Point *p, int smooth, int level)
|
||||
evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints EINA_UNUSED, RGBA_Map_Point *p, int smooth, Eina_Bool anti_alias, int level)
|
||||
{
|
||||
#ifdef BUILD_MMX
|
||||
int mmx, sse, sse2;
|
||||
|
@ -866,7 +866,7 @@ evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip
|
|||
_evas_common_map_rgba_internal_mmx(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, render_op,
|
||||
p, smooth, level);
|
||||
p, smooth, anti_alias, level);
|
||||
else
|
||||
#endif
|
||||
#ifdef BUILD_NEON
|
||||
|
@ -874,13 +874,13 @@ evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip
|
|||
_evas_common_map_rgba_internal_neon(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, render_op,
|
||||
p, smooth, level);
|
||||
p, smooth, anti_alias, level);
|
||||
else
|
||||
#endif
|
||||
_evas_common_map_rgba_internal(src, dst,
|
||||
clip_x, clip_y, clip_w, clip_h,
|
||||
mul_col, render_op,
|
||||
p, smooth, level);
|
||||
p, smooth, anti_alias, level);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -912,17 +912,20 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
|
|||
#ifdef BUILD_MMX
|
||||
if (mmx)
|
||||
evas_common_map_rgba_internal_mmx_do(src, dst, dc,
|
||||
&spans->spans[0], smooth, level);
|
||||
&spans->spans[0], smooth,
|
||||
dc->anti_alias, level);
|
||||
else
|
||||
#endif
|
||||
#ifdef BUILD_NEON
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
|
||||
evas_common_map_rgba_internal_neon_do(src, dst, dc,
|
||||
&spans->spans[0], smooth, level);
|
||||
&spans->spans[0], smooth,
|
||||
dc->anti_alias, level);
|
||||
else
|
||||
#endif
|
||||
evas_common_map_rgba_internal_do(src, dst, dc,
|
||||
&spans->spans[0], smooth, level);
|
||||
&spans->spans[0], smooth,
|
||||
dc->anti_alias, level);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -935,17 +938,22 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
|
|||
evas_common_draw_context_set_clip(dc, area.x, area.y, area.w, area.h);
|
||||
#ifdef BUILD_MMX
|
||||
if (mmx)
|
||||
evas_common_map_rgba_internal_mmx_do(src, dst, dc,
|
||||
&spans->spans[i], smooth, level);
|
||||
{
|
||||
evas_common_map_rgba_internal_mmx_do(src, dst, dc,
|
||||
&spans->spans[i], smooth,
|
||||
dc->anti_alias, level);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef BUILD_NEON
|
||||
if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
|
||||
evas_common_map_rgba_internal_neon_do(src, dst, dc,
|
||||
&spans->spans[i], smooth, level);
|
||||
&spans->spans[i], smooth,
|
||||
dc->anti_alias, level);
|
||||
else
|
||||
#endif
|
||||
evas_common_map_rgba_internal_do(src, dst, dc,
|
||||
&spans->spans[i], smooth, level);
|
||||
&spans->spans[i], smooth,
|
||||
dc->anti_alias, level);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
|
|||
int npoints, RGBA_Map_Point *points,
|
||||
int smooth, int level);
|
||||
|
||||
EAPI void evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints, RGBA_Map_Point *p, int smooth, int level);
|
||||
EAPI void evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints, RGBA_Map_Point *p, int smooth, Eina_Bool anti_alias, int level);
|
||||
|
||||
EAPI Eina_Bool
|
||||
evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst,
|
||||
|
|
|
@ -4,7 +4,7 @@ FUNC_NAME(RGBA_Image *src, RGBA_Image *dst,
|
|||
int clip_x, int clip_y, int clip_w, int clip_h,
|
||||
DATA32 mul_col, int render_op,
|
||||
RGBA_Map_Point *p,
|
||||
int smooth, int level EINA_UNUSED) // level unused for now - for future use
|
||||
int smooth, int anti_alias, int level EINA_UNUSED) // level unused for now - for future use
|
||||
{
|
||||
int i;
|
||||
int cx, cy, cw, ch;
|
||||
|
@ -115,7 +115,7 @@ static void
|
|||
FUNC_NAME_DO(RGBA_Image *src, RGBA_Image *dst,
|
||||
RGBA_Draw_Context *dc,
|
||||
const RGBA_Map_Spans *ms,
|
||||
int smooth, int level EINA_UNUSED) // level unused for now - for future use
|
||||
int smooth, int anti_alias EINA_UNUSED, int level EINA_UNUSED) // level unused for now - for future use
|
||||
{
|
||||
Line *spans;
|
||||
DATA32 *buf = NULL, *sp;
|
||||
|
|
|
@ -606,7 +606,8 @@ evas_common_pipe_map_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA
|
|||
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
|
||||
evas_common_map_rgba_do(&info->area, op->op.map.src, dst,
|
||||
&context, op->op.map.m,
|
||||
op->op.map.smooth, op->op.map.level);
|
||||
op->op.map.smooth, op->op.map.anti_alias,
|
||||
op->op.map.level);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -647,6 +648,7 @@ evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
|
|||
src->ref++;
|
||||
op->op.map.src = src;
|
||||
op->op.map.m = m;
|
||||
op->op.map.anti_alias = dc->anti_alias;
|
||||
op->op_func = evas_common_pipe_map_draw_do;
|
||||
op->free_func = evas_common_pipe_op_map_free;
|
||||
op->prepare_func = evas_common_pipe_map_draw_prepare;
|
||||
|
|
|
@ -356,6 +356,7 @@ struct _Evas_Thread_Command_Map
|
|||
int render_op;
|
||||
RGBA_Map *map;
|
||||
int smooth, level, offset;
|
||||
Eina_Bool anti_alias;
|
||||
};
|
||||
|
||||
struct _Evas_Thread_Command_Multi_Font
|
||||
|
@ -1530,7 +1531,7 @@ _draw_thread_map_draw(void *data)
|
|||
(im, map->surface,
|
||||
map->clip.x, map->clip.y, map->clip.w, map->clip.h,
|
||||
map->mul_col, map->render_op, m->count - offset, &m->pts[offset],
|
||||
map->smooth, map->level);
|
||||
map->smooth, map->anti_alias, map->level);
|
||||
}
|
||||
|
||||
evas_common_cpu_end_opt();
|
||||
|
@ -1575,6 +1576,7 @@ _map_draw_thread_cmd(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RG
|
|||
|
||||
cm->mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
|
||||
cm->render_op = dc->render_op;
|
||||
cm->anti_alias = dc->anti_alias;
|
||||
|
||||
cm->map = calloc(1, sizeof(RGBA_Map) +
|
||||
sizeof(RGBA_Map_Point) * map->count);
|
||||
|
|
Loading…
Reference in New Issue