diff --git a/legacy/evas/src/modules/engines/directfb/evas_engine.c b/legacy/evas/src/modules/engines/directfb/evas_engine.c index 41386b20f2..a6dce6af19 100644 --- a/legacy/evas/src/modules/engines/directfb/evas_engine.c +++ b/legacy/evas/src/modules/engines/directfb/evas_engine.c @@ -1554,7 +1554,7 @@ evas_engine_dfb_image_draw(void *data, void *context, void *surface, void *image #endif static void -evas_engine_dfb_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +evas_engine_dfb_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level) { Render_Engine *re = (Render_Engine*) data; DirectFB_Engine_Image_Entry *deie = image; @@ -1573,7 +1573,7 @@ evas_engine_dfb_image_map_draw(void *data __UNUSED__, void *context, void *surfa if (!_dfb_lock_and_sync_image(deie->surface, src, DSLF_READ)) goto error_src; - evas_common_map_rgba(src, dst, context, 4, p, smooth, level); + evas_common_map_rgba(src, dst, context, 4, &m->pts[0], smooth, level); evas_common_cpu_end_opt(); screen->Unlock(screen); diff --git a/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c b/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c index 32d8bf6ef4..245de0f19a 100644 --- a/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_cocoa/evas_engine.c @@ -918,7 +918,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image) } static void -eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level) { Evas_GL_Image *gim = image; Render_Engine *re; @@ -928,42 +928,42 @@ eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *im eng_window_use(re->win); evas_gl_common_context_target_surface_set(re->win->gl_context, surface); re->win->gl_context->dc = context; - if (npoints != 4) + if (m->count != 4) { - // FIXME: nash - you didnt fix this + // FIXME: nash - you didn't fix this abort(); } - 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].x <= p[1].x) && - (p[0].y <= p[2].y) && - (p[0].u == 0) && - (p[0].v == 0) && - (p[1].u == (gim->w << FP)) && - (p[1].v == 0) && - (p[2].u == (gim->w << FP)) && - (p[2].v == (gim->h << FP)) && - (p[3].u == 0) && - (p[3].v == (gim->h << FP)) && - (p[0].col == 0xffffffff) && - (p[1].col == 0xffffffff) && - (p[2].col == 0xffffffff) && - (p[3].col == 0xffffffff)) + if ((m->pts[0].x == m->pts[3].x) && + (m->pts[1].x == m->pts[2].x) && + (m->pts[0].y == m->pts[1].y) && + (m->pts[3].y == m->pts[2].y) && + (m->pts[0].x <= m->pts[1].x) && + (m->pts[0].y <= m->pts[2].y) && + (m->pts[0].u == 0) && + (m->pts[0].v == 0) && + (m->pts[1].u == (gim->w << FP)) && + (m->pts[1].v == 0) && + (m->pts[2].u == (gim->w << FP)) && + (m->pts[2].v == (gim->h << FP)) && + (m->pts[3].u == 0) && + (m->pts[3].v == (gim->h << FP)) && + (m->pts[0].col == 0xffffffff) && + (m->pts[1].col == 0xffffffff) && + (m->pts[2].col == 0xffffffff) && + (m->pts[3].col == 0xffffffff)) { 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; + + dx = m->pts[0].x >> FP; + dy = m->pts[0].y >> FP; + dw = (m->pts[2].x >> FP) - dx; + dh = (m->pts[2].y >> FP) - dy; eng_image_draw(data, context, surface, image, 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth); } else { - evas_gl_common_image_map_draw(re->win->gl_context, image, npoints, p, + evas_gl_common_image_map_draw(re->win->gl_context, image, m->count, &m->pts[0], smooth, level); } } diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c index f822f3a4f0..b8ed5206da 100644 --- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c +++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c @@ -810,14 +810,52 @@ eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) } static void -eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level) { + Evas_GL_Image *gim = image; Render_Engine *re; - + re = (Render_Engine *)data; evas_gl_common_context_target_surface_set(re->gl_context, surface); re->gl_context->dc = context; - evas_gl_common_image_map_draw(re->gl_context, image, npoints, p, smooth, level); + if (m->count != 4) + { + // FIXME: nash - you didn't fix this + abort(); + } + if ((m->pts[0].x == m->pts[3].x) && + (m->pts[1].x == m->pts[2].x) && + (m->pts[0].y == m->pts[1].y) && + (m->pts[3].y == m->pts[2].y) && + (m->pts[0].x <= m->pts[1].x) && + (m->pts[0].y <= m->pts[2].y) && + (m->pts[0].u == 0) && + (m->pts[0].v == 0) && + (m->pts[1].u == (gim->w << FP)) && + (m->pts[1].v == 0) && + (m->pts[2].u == (gim->w << FP)) && + (m->pts[2].v == (gim->h << FP)) && + (m->pts[3].u == 0) && + (m->pts[3].v == (gim->h << FP)) && + (m->pts[0].col == 0xffffffff) && + (m->pts[1].col == 0xffffffff) && + (m->pts[2].col == 0xffffffff) && + (m->pts[3].col == 0xffffffff)) + { + int dx, dy, dw, dh; + + dx = m->pts[0].x >> FP; + dy = m->pts[0].y >> FP; + dw = (m->pts[2].x >> FP) - dx; + dh = (m->pts[2].y >> FP) - dy; + eng_image_draw(data, context, surface, image, + 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth); + } + else + { + evas_gl_common_image_map_draw(re->gl_context, image, m->count, &m->pts[0], + smooth, level); + } } static void * diff --git a/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c b/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c index d94b5a0caa..bdd731af07 100644 --- a/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c +++ b/legacy/evas/src/modules/engines/software_16_sdl/evas_engine.c @@ -842,7 +842,7 @@ evas_engine_sdl16_image_draw(void *data __UNUSED__, void *context, void *surface } static void -evas_engine_sdl16_image_map_draw(void *data __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, void *image __UNUSED__, int npoints __UNUSED__, RGBA_Map_Point *p __UNUSED__, int smooth __UNUSED__, int level __UNUSED__) +evas_engine_sdl16_image_map_draw(void *data __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, void *image __UNUSED__, RGBA_Map *m __UNUSED__, int smooth __UNUSED__, int level __UNUSED__) { }