From: Leandro Pereira Date: Mon, 17 Dec 2012 21:28:32 +0000 (+0000) Subject: evas/common: Prepare soil to land rect drawing code for threaded render X-Git-Tag: submit/devel/efl/20131022.203902~2800 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b51ab5fc02581cbee3c26dcd7b9bfd3b142baa55;p=platform%2Fupstream%2Fefl.git evas/common: Prepare soil to land rect drawing code for threaded render SVN revision: 81186 --- diff --git a/src/lib/evas/common/evas_rectangle.h b/src/lib/evas/common/evas_rectangle.h index d5a64ec..87eaeb1 100644 --- a/src/lib/evas/common/evas_rectangle.h +++ b/src/lib/evas/common/evas_rectangle.h @@ -3,12 +3,14 @@ typedef void (*Evas_Common_Rectangle_Draw_Cb)(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); -EAPI void evas_common_rectangle_init (void); -EAPI void evas_common_rectangle_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, Evas_Common_Rectangle_Draw_Cb cb); -EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); +EAPI void evas_common_rectangle_init (void); +EAPI void evas_common_rectangle_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, Evas_Common_Rectangle_Draw_Cb cb); +EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_rectangle_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects *reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); +EAPI void evas_common_rectangle_rgba_draw (RGBA_Image *dst, DATA32 color, int render_op, int x, int y, int w, int h); + #endif /* _EVAS_RECTANGLE_H */ diff --git a/src/lib/evas/common/evas_rectangle_main.c b/src/lib/evas/common/evas_rectangle_main.c index c8d7a71..4aa536a 100644 --- a/src/lib/evas/common/evas_rectangle_main.c +++ b/src/lib/evas/common/evas_rectangle_main.c @@ -141,3 +141,19 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in } } } + +EAPI void +evas_common_rectangle_rgba_draw(RGBA_Image *dst, DATA32 color, int render_op, int x, int y, int w, int h) +{ + RGBA_Gfx_Func func; + DATA32 *ptr; + int yy; + + func = evas_common_gfx_func_composite_color_span_get(color, dst, w, render_op); + ptr = dst->image.data + (y * dst->cache_entry.w) + x; + for (yy = 0; yy < h; yy++) + { + func(NULL, NULL, color, ptr, w); + ptr += dst->cache_entry.w; + } +}