summaryrefslogtreecommitdiff
path: root/src/modules/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-12-09 10:45:53 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:44 +0900
commit57902fffd3653ee3640185c7f637889af1a9a80a (patch)
treeec25f7a1e3a72da4f34f3b2f2cd17777f338115a /src/modules/evas
parente3af2783ff0921bf914d3edf0f0cd6253da27b8d (diff)
Evas filters: Use Ector.Buffer instead of RGBA_Image
This is a major refactoring of the evas filters submodule. Use Ector.Buffer and the map/unmap methods instead of directly accessing image buffers with RGBA_Image. RGBA_Image is still used under the hood, for two reasons: - Required for the final output (blend onto Evas itself) - Required for the scaling routines FIXME: - Breaks proxy support (ie. all kind of texturing). - This breaks filters support for the GL engine.
Diffstat (limited to 'src/modules/evas')
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c20
-rw-r--r--src/modules/evas/engines/software_generic/evas_ector_software_buffer.c2
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c19
3 files changed, 31 insertions, 10 deletions
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 0a9e0bcaa6..78a73f41d1 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2465,17 +2465,20 @@ eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector)
2465} 2465}
2466 2466
2467static Ector_Buffer * 2467static Ector_Buffer *
2468eng_ector_buffer_new(void *data EINA_UNUSED, Evas *e, void *engine_image) 2468eng_ector_buffer_wrap(void *data EINA_UNUSED, Evas *e, void *engine_image)
2469{ 2469{
2470 Evas_GL_Image *im = engine_image;
2471 Ector_Buffer *buf = NULL;
2472
2473 if (!im) return NULL;
2474
2475#warning FIXME: implement me 2470#warning FIXME: implement me
2476 (void) e; 2471 return NULL;
2472}
2477 2473
2478 return buf; 2474static Ector_Buffer *
2475eng_ector_buffer_new(void *data EINA_UNUSED, Evas *e, void *pixels,
2476 int width, int height, int stride,
2477 Efl_Gfx_Colorspace cspace, Eina_Bool writeable,
2478 int l, int r, int t, int b, Ector_Buffer_Flag flags)
2479{
2480#warning FIXME: implement me
2481 return NULL;
2479} 2482}
2480 2483
2481static Efl_Gfx_Render_Op 2484static Efl_Gfx_Render_Op
@@ -2836,6 +2839,7 @@ module_open(Evas_Module *em)
2836 2839
2837 ORD(ector_create); 2840 ORD(ector_create);
2838 ORD(ector_destroy); 2841 ORD(ector_destroy);
2842 ORD(ector_buffer_wrap);
2839 ORD(ector_buffer_new); 2843 ORD(ector_buffer_new);
2840 ORD(ector_begin); 2844 ORD(ector_begin);
2841 ORD(ector_renderer_draw); 2845 ORD(ector_renderer_draw);
diff --git a/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c b/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
index 3d45862653..44ebf8fbd3 100644
--- a/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
+++ b/src/modules/evas/engines/software_generic/evas_ector_software_buffer.c
@@ -49,7 +49,7 @@ _evas_ector_software_buffer_evas_ector_buffer_engine_image_set(Eo *obj, Evas_Ect
49 49
50 eo_do(obj, ector_buffer_pixels_set(im->image.data, 50 eo_do(obj, ector_buffer_pixels_set(im->image.data,
51 im->cache_entry.w, im->cache_entry.h, 0, 51 im->cache_entry.w, im->cache_entry.h, 0,
52 _evas_to_gfx_render_op(im->cache_entry.space), 52 im->cache_entry.space,
53 EINA_TRUE, 0, 0, 0, 0)); 53 EINA_TRUE, 0, 0, 0, 0));
54} 54}
55 55
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 22967ad14d..a32c7e60c6 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -3758,7 +3758,7 @@ eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector)
3758} 3758}
3759 3759
3760static Ector_Buffer * 3760static Ector_Buffer *
3761eng_ector_buffer_new(void *data EINA_UNUSED, Evas *e, void *engine_image) 3761eng_ector_buffer_wrap(void *data EINA_UNUSED, Evas *e, void *engine_image)
3762{ 3762{
3763 Image_Entry *ie = engine_image; 3763 Image_Entry *ie = engine_image;
3764 Ector_Buffer *buf = NULL; 3764 Ector_Buffer *buf = NULL;
@@ -3771,6 +3771,22 @@ eng_ector_buffer_new(void *data EINA_UNUSED, Evas *e, void *engine_image)
3771 return buf; 3771 return buf;
3772} 3772}
3773 3773
3774static Ector_Buffer *
3775eng_ector_buffer_new(void *data EINA_UNUSED, Evas *e, void *pixels,
3776 int width, int height, int stride,
3777 Efl_Gfx_Colorspace cspace, Eina_Bool writeable,
3778 int l, int r, int t, int b,
3779 Ector_Buffer_Flag flags EINA_UNUSED)
3780{
3781 Ector_Buffer *buf = NULL;
3782
3783 buf = eo_add(ECTOR_SOFTWARE_BUFFER_CLASS, e,
3784 ector_buffer_pixels_set(pixels, width, height, stride, cspace,
3785 writeable, l, r, t, b));
3786
3787 return buf;
3788}
3789
3774static Efl_Gfx_Render_Op 3790static Efl_Gfx_Render_Op
3775_evas_render_op_to_ector_rop(Evas_Render_Op op) 3791_evas_render_op_to_ector_rop(Evas_Render_Op op)
3776{ 3792{
@@ -4182,6 +4198,7 @@ static Evas_Func func =
4182 NULL, // eng_texture_image_get 4198 NULL, // eng_texture_image_get
4183 eng_ector_create, 4199 eng_ector_create,
4184 eng_ector_destroy, 4200 eng_ector_destroy,
4201 eng_ector_buffer_wrap,
4185 eng_ector_buffer_new, 4202 eng_ector_buffer_new,
4186 eng_ector_begin, 4203 eng_ector_begin,
4187 eng_ector_renderer_draw, 4204 eng_ector_renderer_draw,