summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_private.h
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-09-17 11:46:09 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-09-17 11:49:48 -0700
commit39fdfc3cac94746c9943cac04c99314d1b0b95a3 (patch)
treeefe8c497a6ee12cac5d318f59d8029c2b709daf3 /src/lib/ector/software/ector_software_private.h
parente380ddb742384546ad05a5f8f5472ecdce795538 (diff)
ector: move gradient color computation to a pool of thread.
This has been a long standing plan for improving performance in rendering vector object. If your test involve updating gradient, you will get another speedup of around 15%. Combined with previous shape, we get a 65% improvement with doing the CPU intensive computation in there own thread before the rendering kickoff. This was motly theorical until now, but well, it works great !
Diffstat (limited to 'src/lib/ector/software/ector_software_private.h')
-rw-r--r--src/lib/ector/software/ector_software_private.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h
index e35f6818df..270a14d96c 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -44,8 +44,10 @@ typedef struct _Ector_Renderer_Software_Gradient_Data
44 Software_Gradient_Linear_Data linear; 44 Software_Gradient_Linear_Data linear;
45 Software_Gradient_Radial_Data radial; 45 Software_Gradient_Radial_Data radial;
46 }; 46 };
47 Eina_Bool alpha;
48 uint32_t* color_table; 47 uint32_t* color_table;
48
49 Eina_Bool alpha;
50 Eina_Bool done;
49} Ector_Renderer_Software_Gradient_Data; 51} Ector_Renderer_Software_Gradient_Data;
50 52
51typedef struct _Shape_Rle_Data 53typedef struct _Shape_Rle_Data
@@ -133,7 +135,6 @@ void ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle);
133 135
134 136
135// Gradient Api 137// Gradient Api
136void update_color_table(Ector_Renderer_Software_Gradient_Data *gdata);
137void destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata); 138void destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata);
138void fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length); 139void fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length);
139void fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length); 140void fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length);
@@ -146,4 +147,6 @@ typedef void (*Ector_Thread_Worker_Cb)(void *data, Ector_Software_Thread *thread
146void ector_software_wait(Ector_Thread_Worker_Cb cb, Eina_Free_Cb done, void *data); 147void ector_software_wait(Ector_Thread_Worker_Cb cb, Eina_Free_Cb done, void *data);
147void ector_software_schedule(Ector_Thread_Worker_Cb cb, Eina_Free_Cb done, void *data); 148void ector_software_schedule(Ector_Thread_Worker_Cb cb, Eina_Free_Cb done, void *data);
148 149
150void ector_software_gradient_color_update(Ector_Renderer_Software_Gradient_Data *gdata);
151
149#endif 152#endif