fix most of nash's mess. 2 added aborts that nash has to fix.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 10 Feb 2011 06:52:53 +0000 (06:52 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 10 Feb 2011 06:52:53 +0000 (06:52 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@56891 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

22 files changed:
src/lib/canvas/evas_render.c
src/modules/engines/buffer/evas_engine.c
src/modules/engines/cairo_x11/evas_engine.c
src/modules/engines/direct3d/evas_engine.c
src/modules/engines/directfb/evas_engine.c
src/modules/engines/fb/evas_engine.c
src/modules/engines/gl_common/evas_gl_common.h
src/modules/engines/gl_common/evas_gl_context.c
src/modules/engines/gl_common/evas_gl_image.c
src/modules/engines/gl_glew/evas_engine.c
src/modules/engines/gl_sdl/evas_engine.c
src/modules/engines/gl_x11/evas_engine.c
src/modules/engines/quartz/evas_engine.c
src/modules/engines/software_16/evas_engine.c
src/modules/engines/software_16_sdl/evas_engine.c
src/modules/engines/software_8/evas_engine.c
src/modules/engines/software_ddraw/evas_engine.c
src/modules/engines/software_gdi/evas_engine.c
src/modules/engines/software_qtopia/evas_engine.c
src/modules/engines/software_sdl/evas_engine.c
src/modules/engines/software_x11/evas_engine.c
src/modules/engines/xrender_x11/evas_engine.c

index 26a4b13..618cf8e 100644 (file)
@@ -890,7 +890,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
           }
 
         RDI(level);
-        RD("        draw map4\n");
+        RD("        draw map\n");
 
         if (rendered)
           {
index 851d905..0277db4 100644 (file)
@@ -306,7 +306,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
 
    re = (Render_Engine *)data;
 #ifdef BUILD_PIPE_RENDER
-   evas_common_pipe_map4_begin(surface);
+   evas_common_pipe_map_begin(surface);
 #endif   
    evas_buffer_outbuf_buf_push_updated_region(re->ob, surface, x, y, w, h);
    evas_buffer_outbuf_buf_free_region_for_update(re->ob, surface);
index 0f096aa..33c9ea9 100644 (file)
@@ -213,7 +213,7 @@ static Evas_Func eng_func =
      eng_image_scale_hint_get,
      /* more font draw functions */
      eng_font_last_up_to_pos,
-     NULL, //   ORD(image_map4_draw);
+     NULL, //   ORD(image_map_draw);
      NULL, //   ORD(image_map_surface_new);
      NULL, //   ORD(image_map_surface_free);
      NULL, // eng_image_content_hint_set - software doesn't use it
index 561a8ee..2ed59bc 100644 (file)
@@ -469,7 +469,7 @@ module_open(Evas_Module *em)
    ORD(image_scale_hint_set);
    ORD(image_scale_hint_get);
 
-//   ORD(image_map4_draw);
+//   ORD(image_map_draw);
 //   ORD(image_map_surface_new);
 //   ORD(image_map_surface_free);
 
index eb70096..4f960cd 100644 (file)
@@ -1551,7 +1551,7 @@ evas_engine_dfb_image_draw(void *data, void *context, void *surface, void *image
 #endif
 
 static void
-evas_engine_dfb_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
+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)
 {
    Render_Engine *re = (Render_Engine*) data;
    DirectFB_Engine_Image_Entry *deie = image;
@@ -1718,7 +1718,7 @@ module_open(Evas_Module *em)
    ORD(image_scale_hint_set);
    ORD(image_scale_hint_get);
 
-   ORD(image_map4_draw);
+   ORD(image_map_draw);
    ORD(image_map_surface_new);
    ORD(image_map_surface_free);
 
index b2b8b58..7681b00 100644 (file)
@@ -223,7 +223,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
 
    re = (Render_Engine *)data;
 #ifdef BUILD_PIPE_RENDER
-   evas_common_pipe_map4_begin(surface);
+   evas_common_pipe_map_begin(surface);
 #endif   
    evas_fb_outbuf_fb_push_updated_region(re->ob, surface, x, y, w, h);
    evas_fb_outbuf_fb_free_region_for_update(re->ob, surface);
index c8917f1..d376c9b 100644 (file)
@@ -432,14 +432,15 @@ void             evas_gl_common_context_yuv_push(Evas_GL_Context *gc,
                                                  int x, int y, int w, int h,
                                                  int r, int g, int b, int a,
                                                  Eina_Bool smooth);
-void             evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
-                                                        Evas_GL_Texture *tex,
-                                                        RGBA_Map_Point *p,
-                                                        int clip, int cx, int cy, int cw, int ch,
-                                                        int r, int g, int b, int a,
-                                                        Eina_Bool smooth, 
-                                                        Eina_Bool tex_only,
-                                                        Eina_Bool yuv);
+void             evas_gl_common_context_image_map_push(Evas_GL_Context *gc,
+                                                       Evas_GL_Texture *tex,
+                                                       int npoints,
+                                                       RGBA_Map_Point *p,
+                                                       int clip, int cx, int cy, int cw, int ch,
+                                                       int r, int g, int b, int a,
+                                                       Eina_Bool smooth, 
+                                                       Eina_Bool tex_only,
+                                                       Eina_Bool yuv);
 void              evas_gl_common_context_flush(Evas_GL_Context *gc);
 
 int               evas_gl_common_shader_program_init(Evas_GL_Program *p,
@@ -477,7 +478,7 @@ void              evas_gl_common_image_cache_flush(Evas_GL_Context *gc);
 void              evas_gl_common_image_free(Evas_GL_Image *im);
 Evas_GL_Image    *evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
 void              evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
-void              evas_gl_common_image_map4_draw(Evas_GL_Context *gc, Evas_GL_Image *im, RGBA_Map_Point *p, int smooth, int level);
+void              evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level);
 void              evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
 
 void             *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg);
index ac9e9eb..67af362 100644 (file)
@@ -1885,13 +1885,14 @@ again:
 }
 
 void
-evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
-                                       Evas_GL_Texture *tex,
-                                       RGBA_Map_Point *p,
-                                       int clip, int cx, int cy, int cw, int ch,
-                                       int r, int g, int b, int a,
-                                       Eina_Bool smooth, Eina_Bool tex_only,
-                                       Eina_Bool yuv)
+evas_gl_common_context_image_map_push(Evas_GL_Context *gc,
+                                      Evas_GL_Texture *tex,
+                                      int npoints,
+                                      RGBA_Map_Point *p,
+                                      int clip, int cx, int cy, int cw, int ch,
+                                      int r, int g, int b, int a,
+                                      Eina_Bool smooth, Eina_Bool tex_only,
+                                      Eina_Bool yuv)
 {
    int pnum, nv, nc, nu, nu2, nu3, nt, i;
    const int points[6] = { 0, 1, 2, 0, 2, 3 };
@@ -1905,6 +1906,11 @@ evas_gl_common_context_image_map4_push(Evas_GL_Context *gc,
 
    if (!tex->alpha) blend = 0;
    if (a < 255) blend = 1;
+   if (npoints != 4)
+     {
+        // FIXME: nash - you didnt fix this for n points. its still all 4 point stuff!!! grrrr.
+        abort();
+     }
    if ((A_VAL(&(p[0].col)) < 0xff) || (A_VAL(&(p[1].col)) < 0xff) ||
        (A_VAL(&(p[2].col)) < 0xff) || (A_VAL(&(p[3].col)) < 0xff))
      blend = 1;
@@ -2220,7 +2226,7 @@ again:
    if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
      {
         // FIXME: handle yinvert
-        ERR("not handling inverted y case for map4");
+        ERR("not handling inverted y case for map");
      }
    
    cmul = ARGB_JOIN(a, r, g, b);
index 175c37b..1133da0 100644 (file)
@@ -525,8 +525,8 @@ _evas_gl_common_image_update(Evas_GL_Context *gc, Evas_GL_Image *im)
 }
 
 void
-evas_gl_common_image_map4_draw(Evas_GL_Context *gc, Evas_GL_Image *im, 
-                               RGBA_Map_Point *p, int smooth, int level __UNUSED__)
+evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im, 
+                              int npoints, RGBA_Map_Point *p, int smooth, int level __UNUSED__)
 {
    RGBA_Draw_Context *dc;
    int r, g, b, a;
@@ -555,10 +555,10 @@ evas_gl_common_image_map4_draw(Evas_GL_Context *gc, Evas_GL_Image *im,
    if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
        (im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL))
       yuv = 1;
-   evas_gl_common_context_image_map4_push(gc, im->tex, p, 
-                                          c, cx, cy, cw, ch, 
-                                          r, g, b, a, smooth, im->tex_only,
-                                          yuv);
+   evas_gl_common_context_image_map_push(gc, im->tex, npoints, p,
+                                         c, cx, cy, cw, ch, 
+                                         r, g, b, a, smooth, im->tex_only,
+                                         yuv);
 }
 
 void
index 4ece31d..43e349d 100644 (file)
@@ -729,7 +729,7 @@ eng_image_scale_hint_get(void *data __UNUSED__, void *image __UNUSED__)
 }
 
 static void
-eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
+eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
 {
    // XXX
 }
@@ -853,7 +853,7 @@ module_open(Evas_Module *em)
    ORD(image_scale_hint_set);
    ORD(image_scale_hint_get);
    
-   ORD(image_map4_draw);
+   ORD(image_map_draw);
    ORD(image_map_surface_new);
    ORD(image_map_surface_free);
    
index cfc460a..fd4f817 100644 (file)
@@ -785,14 +785,14 @@ eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint)
 }
 
 static void
-eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
+eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
 {
    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_map4_draw(re->gl_context, image, p, smooth, level);
+   evas_gl_common_image_map_draw(re->gl_context, image, npoints, p, smooth, level);
 }
 
 static void *
@@ -922,7 +922,7 @@ module_open(Evas_Module *em)
    ORD(image_scale_hint_set);
    ORD(image_scale_hint_get);
    
-   ORD(image_map4_draw);
+   ORD(image_map_draw);
    ORD(image_map_surface_new);
    ORD(image_map_surface_free);
    
index 1e7a8e7..af9c26f 100644 (file)
@@ -1738,7 +1738,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 __UNUSED__, RGBA_Map_Point *p, int smooth, int level)
+eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
 {
    Evas_GL_Image *gim = image;
    Render_Engine *re;
@@ -1748,6 +1748,11 @@ 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)
+     {
+        // FIXME: nash - you didnt fix this
+        abort();
+     }
    if ((p[0].x == p[3].x) &&
        (p[1].x == p[2].x) &&
        (p[0].y == p[1].y) &&
@@ -1778,8 +1783,8 @@ eng_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *im
      }
    else
      {
-        evas_gl_common_image_map4_draw(re->win->gl_context, image, p,
-                                       smooth, level);
+        evas_gl_common_image_map_draw(re->win->gl_context, image, npoints, p,
+                                      smooth, level);
      }
 }
 
index 6f948b9..a26f2cd 100644 (file)
@@ -1321,7 +1321,7 @@ module_open(Evas_Module *em)
    ORD(image_scale_hint_set);
    ORD(image_scale_hint_get);
 
-//   ORD(image_map4_draw);
+//   ORD(image_map_draw);
 //   ORD(image_map_surface_new);
 //   ORD(image_map_surface_free);
    /* now advertise out our api */
index cec0521..16aa6a4 100644 (file)
@@ -740,7 +740,7 @@ static Evas_Func func =
      eng_image_scale_hint_get,
      /* more font draw functions */
      eng_font_last_up_to_pos,
-     NULL, //   ORD(image_map4_draw);
+     NULL, //   ORD(image_map_draw);
      NULL, //   ORD(image_map_surface_new);
      NULL, //   ORD(image_map_surface_free);
      NULL, // eng_image_content_hint_set - software doesn't use it
index a477575..e4cf501 100644 (file)
@@ -816,7 +816,7 @@ evas_engine_sdl16_image_draw(void *data __UNUSED__, void *context, void *surface
 }
 
 static void
-evas_engine_sdl16_image_map4_draw(void *data __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, void *image __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__, int npoints __UNUSED__, RGBA_Map_Point *p __UNUSED__, int smooth __UNUSED__, int level __UNUSED__)
 {
 }
 
@@ -1074,7 +1074,7 @@ module_open(Evas_Module *em)
    ORD(image_border_set);
    ORD(image_border_get);
    ORD(image_draw);
-   ORD(image_map4_draw);
+   ORD(image_map_draw);
    ORD(image_cache_flush);
    ORD(image_cache_set);
    ORD(image_cache_get);
index 1a25241..1a20036 100644 (file)
@@ -786,7 +786,7 @@ static Evas_Func func = {
    eng_image_scale_hint_get,
    /* more font draw functions */
    eng_font_last_up_to_pos,
-   NULL, //   ORD(image_map4_draw);
+   NULL, //   ORD(image_map_draw);
    NULL, //   ORD(image_map_surface_new);
    NULL, //   ORD(image_map_surface_free);
    NULL, // eng_image_content_hint_set - software doesn't use it
index 7bcfdf9..5bfc87f 100644 (file)
@@ -287,7 +287,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
 
    re = (Render_Engine *)data;
 #ifdef BUILD_PIPE_RENDER
-   evas_common_pipe_map4_begin(surface);
+   evas_common_pipe_map_begin(surface);
 #endif   
    evas_software_ddraw_outbuf_push_updated_region(re->ob, surface, x, y, w, h);
    evas_software_ddraw_outbuf_free_region_for_update(re->ob, surface);
index ba80eb5..414e880 100644 (file)
@@ -293,7 +293,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
 
    re = (Render_Engine *)data;
 #ifdef BUILD_PIPE_RENDER
-   evas_common_pipe_map4_begin(surface);
+   evas_common_pipe_map_begin(surface);
 #endif
    evas_software_gdi_outbuf_push_updated_region(re->ob, surface, x, y, w, h);
    evas_software_gdi_outbuf_free_region_for_update(re->ob, surface);
index a291adc..1d84d57 100644 (file)
@@ -237,7 +237,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
 
    re = (Render_Engine *)data;
 #ifdef BUILD_PIPE_RENDER
-   evas_common_pipe_map4_begin(surface);
+   evas_common_pipe_map_begin(surface);
 #endif   
    evas_qtopia_outbuf_software_qtopia_push_updated_region(re->ob, surface, x, y, w, h);
    evas_qtopia_outbuf_software_qtopia_free_region_for_update(re->ob, surface);
index a2bf8fa..7c6f2b5 100644 (file)
@@ -618,7 +618,7 @@ evas_engine_sdl_image_draw(void *data, void *context, void *surface, void *image
 }
 
 static void
-evas_engine_sdl_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level)
+evas_engine_sdl_image_map_draw(void *data __UNUSED__, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level)
 {
    SDL_Engine_Image_Entry *eim = image;
    SDL_Engine_Image_Entry *dst = surface;
@@ -642,7 +642,7 @@ evas_engine_sdl_image_map4_draw(void *data __UNUSED__, void *context, void *surf
      }
 
    evas_common_map_rgba((RGBA_Image*) eim->cache_entry.src,
-                        (RGBA_Image*) dst->cache_entry.src, context, 4, p, smooth, level);
+                        (RGBA_Image*) dst->cache_entry.src, context, npoints, p, smooth, level);
    evas_common_cpu_end_opt();
 
    if (mustlock_im)
@@ -903,7 +903,7 @@ static int module_open(Evas_Module *em)
    ORD(image_border_set);
    ORD(image_border_get);
    ORD(image_draw);
-   ORD(image_map4_draw);
+   ORD(image_map_draw);
    ORD(image_map_surface_new);
    ORD(image_map_surface_free);
    ORD(image_comment_get);
index 722f5f3..aff3469 100644 (file)
@@ -736,7 +736,7 @@ eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int
 
    re = (Render_Engine *)data;
 #if defined(BUILD_PIPE_RENDER) && !defined(EVAS_FRAME_QUEUING)
-   evas_common_pipe_map4_begin(surface);
+   evas_common_pipe_map_begin(surface);
 #endif /* BUILD_PIPE_RENDER  && !EVAS_FRAME_QUEUING*/
 
 #ifdef EVAS_FRAME_QUEUING
index ce84c43..b7efa97 100644 (file)
@@ -1286,7 +1286,7 @@ module_open(Evas_Module *em)
    ORD(image_scale_hint_set);
    ORD(image_scale_hint_get);
 
-//   ORD(image_map4_draw);
+//   ORD(image_map_draw);
 //   ORD(image_map_surface_new);
 //   ORD(image_map_surface_free);