move fastpath where it should be

SVN revision: 45623
This commit is contained in:
Carsten Haitzler 2010-01-27 06:49:21 +00:00
parent 9b343e33e3
commit c612e20b40
2 changed files with 32 additions and 33 deletions

View File

@ -727,37 +727,9 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
RDI(level);
RD(" draw map4\n");
if ((pts[0].x == pts[3].x) &&
(pts[1].x == pts[2].x) &&
(pts[0].y == pts[1].y) &&
(pts[3].y == pts[2].y) &&
(pts[0].u == 0) &&
(pts[0].v == 0) &&
(pts[1].u == (obj->cur.map->surface_w << FP)) &&
(pts[1].v == 0) &&
(pts[2].u == (obj->cur.map->surface_w << FP)) &&
(pts[2].v == (obj->cur.map->surface_h << FP)) &&
(pts[3].u == 0) &&
(pts[3].v == (obj->cur.map->surface_h << FP)))
{
int dx, dy, dw, dh;
dx = pts[0].x >> FP;
dy = pts[0].y >> FP;
dw = (pts[2].x >> FP) - dx;
dh = (pts[2].y >> FP) - dy;
obj->layer->evas->engine.func->image_draw
(e->engine.data.output, e->engine.data.context,
surface, obj->cur.map->surface,
0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h,
dx, dy, dw, dh, obj->cur.map->smooth);
}
else
{
obj->layer->evas->engine.func->image_map4_draw
(e->engine.data.output, e->engine.data.context, surface,
obj->cur.map->surface, pts, obj->cur.map->smooth, 0);
}
obj->layer->evas->engine.func->image_map4_draw
(e->engine.data.output, e->engine.data.context, surface,
obj->cur.map->surface, pts, obj->cur.map->smooth, 0);
// FIXME: needs to cache these maps and
// keep them only rendering updates
// obj->layer->evas->engine.func->image_map_surface_free

View File

@ -779,11 +779,38 @@ eng_image_draw(void *data __UNUSED__, void *context, void *surface, void *image,
static void
eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
{
RGBA_Image *im;
RGBA_Image *im, *srf;
RGBA_Map_Point *pt = p;
if (!image) return;
im = image;
evas_common_map4_rgba(im, surface, context, p, smooth, level);
srf = surface;
if ((p[0].x == p[3].x) &&
(p[1].x == p[2].x) &&
(p[0].y == p[1].y) &&
(p[3].y == p[2].y) &&
(p[0].u == 0) &&
(p[0].v == 0) &&
(p[1].u == (im->cache_entry.w << FP)) &&
(p[1].v == 0) &&
(p[2].u == (im->cache_entry.w << FP)) &&
(p[2].v == (im->cache_entry.h << FP)) &&
(p[3].u == 0) &&
(p[3].v == (im->cache_entry.h << FP)))
{
int dx, dy, dw, dh;
dx = p[0].x >> FP;
dy = p[0].y >> FP;
dw = (p[2].x >> FP) - dx;
dh = (p[2].y >> FP) - dy;
eng_image_draw
(data, context, surface, image,
0, 0, im->cache_entry.w, im->cache_entry.h,
dx, dy, dw, dh, smooth);
}
else
evas_common_map4_rgba(im, surface, context, p, smooth, level);
evas_common_cpu_end_opt();
}