fix most of nash's mess. 2 added aborts that nash has to fix.

SVN revision: 56891
This commit is contained in:
Carsten Haitzler 2011-02-10 06:52:53 +00:00
parent 1e58115de6
commit aaad5f7319
22 changed files with 63 additions and 51 deletions

View 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)
{

View 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);

View 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

View 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);

View 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);

View 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);

View 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);

View 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);

View 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

View 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);

View 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);

View 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);
}
}

View 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 */

View 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

View 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);

View 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

View 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);

View 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);

View 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);

View 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);

View 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

View 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);