Evas (wayland_egl): Fix image_draw_map prototype & function code to

match cedric changes.



SVN revision: 73280
This commit is contained in:
Christopher Michael 2012-07-04 12:36:39 +00:00
parent 849caf7b54
commit 86293f9c4f
1 changed files with 26 additions and 26 deletions

View File

@ -1788,7 +1788,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image)
}
static void
eng_image_map_draw(void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
eng_image_map_draw(void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level)
{
Evas_GL_Image *gim = image;
Render_Engine *re;
@ -1798,43 +1798,43 @@ eng_image_map_draw(void *data, void *context, void *surface, void *image, int np
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 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,
smooth, level);
evas_gl_common_image_map_draw(re->win->gl_context, image, m->count,
&m->pts[0], smooth, level);
}
}