summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_surface.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-01-18 11:47:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-14 11:26:43 +0900
commit2ef8d6f39af839c23551239216cea100254f80df (patch)
tree415581d3cb5245012225777926638827051bc3c2 /src/lib/ector/software/ector_software_surface.c
parentfb52c15e8513cc1458341da13e570d231a886551 (diff)
evas filters: Refactor ector and gfx filters A LOT
Alright, so this is a massive patch that is the result of trying to get rid of unused or poorly implemented classes in ector. Originally ector was meant to support VG but extend to things like filters as well. At the moment, ector's design makes it quite hard to plug in the filters. For now I think it's easier to implement the GL support for the filters directly in the engine, where I hope to interfere as little as possible. This massive patch keeps only the required minimum to support a versatile gl buffer that can be mapped, drawn or rendered to (FBO). It's extremely inefficient as it relies on glReadPixels and lots of texture uploads, as well as conversions between ARGB and Alpha. Another type of GL buffer is a wrap around an existing GL image, but that one is read-only (map or draw: no write map, no FBO). No, all the filters run fine, and the high-level implementation (evas_filters.c) does not need to know whether the underlying engine is SW or GL. One problem though appears with the blending or blurring of some Alpha buffers, the colors are wrong. This patch removes more lines than it adds so it must be good ;)
Diffstat (limited to 'src/lib/ector/software/ector_software_surface.c')
-rw-r--r--src/lib/ector/software/ector_software_surface.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index f1492a2a28..1631449a73 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -12,8 +12,8 @@
12 12
13static Ector_Renderer * 13static Ector_Renderer *
14_ector_software_surface_ector_surface_renderer_factory_new(Eo *obj, 14_ector_software_surface_ector_surface_renderer_factory_new(Eo *obj,
15 Ector_Software_Surface_Data *pd EINA_UNUSED, 15 Ector_Software_Surface_Data *pd EINA_UNUSED,
16 const Efl_Class *type) 16 const Efl_Class *type)
17{ 17{
18 if (type == ECTOR_RENDERER_SHAPE_MIXIN) 18 if (type == ECTOR_RENDERER_SHAPE_MIXIN)
19 return efl_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 19 return efl_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
@@ -21,9 +21,8 @@ _ector_software_surface_ector_surface_renderer_factory_new(Eo *obj,
21 return efl_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 21 return efl_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
22 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN) 22 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN)
23 return efl_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 23 return efl_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
24 else if (type == ECTOR_RENDERER_BUFFER_MIXIN) 24
25 return efl_add(ECTOR_RENDERER_SOFTWARE_BUFFER_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 25 ERR("Couldn't find class for type: %s", efl_class_name_get(type));
26 ERR("Couldn't find class for type: %s\n", efl_class_name_get(type));
27 return NULL; 26 return NULL;
28} 27}
29 28
@@ -49,8 +48,8 @@ _ector_software_surface_efl_object_destructor(Eo *obj, Ector_Software_Surface_Da
49 48
50static void 49static void
51_ector_software_surface_ector_surface_reference_point_set(Eo *obj EINA_UNUSED, 50_ector_software_surface_ector_surface_reference_point_set(Eo *obj EINA_UNUSED,
52 Ector_Software_Surface_Data *pd, 51 Ector_Software_Surface_Data *pd,
53 int x, int y) 52 int x, int y)
54{ 53{
55 pd->x = x; 54 pd->x = x;
56 pd->y = y; 55 pd->y = y;