summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>2012-07-23 11:58:37 +0000
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>2012-07-23 11:58:37 +0000
commitcedbafac1464731fcc59193b7295a3cfdecce7a0 (patch)
treeec6a8df0d94d660eadb5f516f02f06d33ffea866 /legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
parentde6cfa77b3419eb8e1870bed6c86385342450941 (diff)
Evas: Update gl_sdl, gl_cocoa, directfb and software_16_sdl engines to use the new function prototype of image_map_draw
The arguments for image_map_draw changed, and these engines were receiving the wrong data. In the case of gl_cocoa and gl_sdl, the gl_common would receive a pointer for 'npoints' and would call abort() because npoints is not 4. SVN revision: 74321
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_sdl/evas_engine.c44
1 files changed, 41 insertions, 3 deletions
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)
810} 810}
811 811
812static void 812static void
813eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) 813eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level)
814{ 814{
815 Evas_GL_Image *gim = image;
815 Render_Engine *re; 816 Render_Engine *re;
816 817
817 re = (Render_Engine *)data; 818 re = (Render_Engine *)data;
818 evas_gl_common_context_target_surface_set(re->gl_context, surface); 819 evas_gl_common_context_target_surface_set(re->gl_context, surface);
819 re->gl_context->dc = context; 820 re->gl_context->dc = context;
820 evas_gl_common_image_map_draw(re->gl_context, image, npoints, p, smooth, level); 821 if (m->count != 4)
822 {
823 // FIXME: nash - you didn't fix this
824 abort();
825 }
826 if ((m->pts[0].x == m->pts[3].x) &&
827 (m->pts[1].x == m->pts[2].x) &&
828 (m->pts[0].y == m->pts[1].y) &&
829 (m->pts[3].y == m->pts[2].y) &&
830 (m->pts[0].x <= m->pts[1].x) &&
831 (m->pts[0].y <= m->pts[2].y) &&
832 (m->pts[0].u == 0) &&
833 (m->pts[0].v == 0) &&
834 (m->pts[1].u == (gim->w << FP)) &&
835 (m->pts[1].v == 0) &&
836 (m->pts[2].u == (gim->w << FP)) &&
837 (m->pts[2].v == (gim->h << FP)) &&
838 (m->pts[3].u == 0) &&
839 (m->pts[3].v == (gim->h << FP)) &&
840 (m->pts[0].col == 0xffffffff) &&
841 (m->pts[1].col == 0xffffffff) &&
842 (m->pts[2].col == 0xffffffff) &&
843 (m->pts[3].col == 0xffffffff))
844 {
845 int dx, dy, dw, dh;
846
847 dx = m->pts[0].x >> FP;
848 dy = m->pts[0].y >> FP;
849 dw = (m->pts[2].x >> FP) - dx;
850 dh = (m->pts[2].y >> FP) - dy;
851 eng_image_draw(data, context, surface, image,
852 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth);
853 }
854 else
855 {
856 evas_gl_common_image_map_draw(re->gl_context, image, m->count, &m->pts[0],
857 smooth, level);
858 }
821} 859}
822 860
823static void * 861static void *