summaryrefslogtreecommitdiff
path: root/src/lib/ector/software/ector_software_private.h
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-09-16 17:43:18 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-09-17 11:49:48 -0700
commitdd297854d13832b275f9d709cdbf0b2ff359e0a8 (patch)
tree716f436fbf54620a874694356dfeb3f2f64fe183 /src/lib/ector/software/ector_software_private.h
parentaec79f9d0d94d2f4717d61dc8aec7f6da3a80606 (diff)
ector: add ability to run task in another thread during preparation stage.
Diffstat (limited to 'src/lib/ector/software/ector_software_private.h')
-rw-r--r--src/lib/ector/software/ector_software_private.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/lib/ector/software/ector_software_private.h b/src/lib/ector/software/ector_software_private.h
index 459de0105d..a255fd34a0 100644
--- a/src/lib/ector/software/ector_software_private.h
+++ b/src/lib/ector/software/ector_software_private.h
@@ -7,6 +7,16 @@
7#include "../ector_private.h" 7#include "../ector_private.h"
8 8
9typedef struct _Ector_Software_Surface_Data Ector_Software_Surface_Data; 9typedef struct _Ector_Software_Surface_Data Ector_Software_Surface_Data;
10typedef struct _Ector_Software_Thread Ector_Software_Thread;
11
12struct _Ector_Software_Thread
13{
14 Eina_Thread_Queue *queue;
15 Eina_Thread thread;
16
17 SW_FT_Raster raster;
18 SW_FT_Stroker stroker;
19};
10 20
11// Gradient related structure 21// Gradient related structure
12typedef struct _Software_Gradient_Linear_Data 22typedef struct _Software_Gradient_Linear_Data
@@ -118,19 +128,26 @@ void ector_software_rasterizer_clip_shape_set(Software_Rasterizer *rasterizer, S
118 128
119 129
120 130
121Shape_Rle_Data * ector_software_rasterizer_generate_rle_data(Software_Rasterizer *rasterizer, SW_FT_Outline *outline); 131Shape_Rle_Data * ector_software_rasterizer_generate_rle_data(Ector_Software_Thread *thread, Software_Rasterizer *rasterizer, SW_FT_Outline *outline);
122Shape_Rle_Data * ector_software_rasterizer_generate_stroke_rle_data(Software_Rasterizer *rasterizer, SW_FT_Outline *outline, Eina_Bool closePath); 132Shape_Rle_Data * ector_software_rasterizer_generate_stroke_rle_data(Ector_Software_Thread *thread, Software_Rasterizer *rasterizer, SW_FT_Outline *outline, Eina_Bool closePath);
123 133
124void ector_software_rasterizer_draw_rle_data(Software_Rasterizer *rasterizer, int x, int y, uint32_t mul_col, Efl_Gfx_Render_Op op, Shape_Rle_Data* rle); 134void ector_software_rasterizer_draw_rle_data(Software_Rasterizer *rasterizer, int x, int y, uint32_t mul_col, Efl_Gfx_Render_Op op, Shape_Rle_Data* rle);
125 135
126void ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle); 136void ector_software_rasterizer_destroy_rle_data(Shape_Rle_Data *rle);
127 137
128 138
129
130// Gradient Api 139// Gradient Api
131void update_color_table(Ector_Renderer_Software_Gradient_Data *gdata); 140void update_color_table(Ector_Renderer_Software_Gradient_Data *gdata);
132void destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata); 141void destroy_color_table(Ector_Renderer_Software_Gradient_Data *gdata);
133void fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length); 142void fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length);
134void fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length); 143void fetch_radial_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int length);
135 144
145void ector_software_thread_init(Ector_Software_Thread *thread);
146void ector_software_thread_shutdown(Ector_Software_Thread *thread);
147
148typedef void (*Ector_Thread_Worker_Cb)(void *data, Ector_Software_Thread *thread);
149
150void ector_software_wait(Ector_Thread_Worker_Cb cb, Eina_Free_Cb done, void *data);
151void ector_software_schedule(Ector_Thread_Worker_Cb cb, Eina_Free_Cb done, void *data);
152
136#endif 153#endif