summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_surface.c
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-09-16 23:23:36 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-09-17 11:49:48 -0700
commite380ddb742384546ad05a5f8f5472ecdce795538 (patch)
tree58cd8ea6ccf9ae8d170f1f6aa8995f085f29ef25 /src/lib/ector/software/ector_software_surface.c
parent560e5c8e0f071d2cbaec0649bc1e8100d9e7f82e (diff)
ector: move RLE shape/stroke computation to a pool of thread.
This has been a long standing plan for improving performance in rendering vector object. Depending on the test, you will get an improvement between 10 to 35% when rendering vector based object. We are still maintaining the Cairo backend as the default one at the moment due to a lack of result comparison tests between the two engine. Hopefully we should get that covered and we can all enjoy a backend that is 4 times faster by default.
Diffstat (limited to 'src/lib/ector/software/ector_software_surface.c')
-rw-r--r--src/lib/ector/software/ector_software_surface.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index 016b2673ac..e3e72fbd2d 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -90,6 +90,7 @@ _ector_software_init(void)
90 90
91 t = &ths[i]; 91 t = &ths[i];
92 t->queue = eina_thread_queue_new(); 92 t->queue = eina_thread_queue_new();
93 ector_software_thread_init(t);
93 if (!eina_thread_create(&t->thread, EINA_THREAD_NORMAL, -1, 94 if (!eina_thread_create(&t->thread, EINA_THREAD_NORMAL, -1,
94 _prepare_process, t)) 95 _prepare_process, t))
95 { 96 {
@@ -107,7 +108,11 @@ _ector_software_shutdown(void)
107 108
108 if (!--count_init) return ; 109 if (!--count_init) return ;
109 110
110 if (!ths) return ; 111 if (!ths)
112 {
113 ector_software_thread_shutdown(&render_thread);
114 return ;
115 }
111 116
112 for (i = 0; i < cpu_core; i++) 117 for (i = 0; i < cpu_core; i++)
113 { 118 {
@@ -123,6 +128,7 @@ _ector_software_shutdown(void)
123 128
124 eina_thread_join(t->thread); 129 eina_thread_join(t->thread);
125 eina_thread_queue_free(t->queue); 130 eina_thread_queue_free(t->queue);
131 ector_software_thread_shutdown(t);
126 } 132 }
127 133
128 eina_thread_queue_free(render_queue); 134 eina_thread_queue_free(render_queue);
@@ -220,7 +226,6 @@ _ector_software_surface_efl_object_constructor(Eo *obj, Ector_Software_Surface_D
220static void 226static void
221_ector_software_surface_efl_object_destructor(Eo *obj, Ector_Software_Surface_Data *pd) 227_ector_software_surface_efl_object_destructor(Eo *obj, Ector_Software_Surface_Data *pd)
222{ 228{
223 ector_software_rasterizer_done(pd->rasterizer);
224 efl_data_unref(obj, pd->rasterizer->fill_data.raster_buffer); 229 efl_data_unref(obj, pd->rasterizer->fill_data.raster_buffer);
225 free(pd->rasterizer); 230 free(pd->rasterizer);
226 pd->rasterizer = NULL; 231 pd->rasterizer = NULL;