diff options
Diffstat (limited to 'libraries/evas/src/lib/engines/common/evas_pipe.h')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_pipe.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_pipe.h b/libraries/evas/src/lib/engines/common/evas_pipe.h new file mode 100644 index 0000000..37b0136 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_pipe.h | |||
@@ -0,0 +1,111 @@ | |||
1 | #ifndef _EVAS_PIPE_H | ||
2 | #define _EVAS_PIPE_H | ||
3 | |||
4 | #include <sys/time.h> | ||
5 | #include "language/evas_bidi_utils.h" | ||
6 | |||
7 | #ifdef BUILD_PTHREAD | ||
8 | typedef struct _Thinfo | ||
9 | { | ||
10 | int thread_num; | ||
11 | pthread_t thread_id; | ||
12 | pthread_barrier_t *barrier; | ||
13 | RGBA_Pipe_Thread_Info *info; | ||
14 | # ifdef EVAS_FRAME_QUEUING | ||
15 | void *fq_info; | ||
16 | #endif | ||
17 | } Thinfo; | ||
18 | #endif | ||
19 | |||
20 | #ifdef EVAS_FRAME_QUEUING | ||
21 | struct _Evas_Surface | ||
22 | { | ||
23 | EINA_INLIST; | ||
24 | RGBA_Image *im; | ||
25 | int x, y, w, h; | ||
26 | int dontpush; // dont push the surface out after drawing done | ||
27 | }; | ||
28 | typedef struct _Evas_Surface Evas_Surface; | ||
29 | |||
30 | struct _Evas_Frame | ||
31 | { | ||
32 | EINA_INLIST; | ||
33 | Evas_Surface *surfaces; | ||
34 | void *data; | ||
35 | int in_process; | ||
36 | int ready; | ||
37 | int dont_schedule; | ||
38 | struct timeval ready_time; | ||
39 | |||
40 | void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h); | ||
41 | void (*output_flush) (void *data); | ||
42 | void (*output_set_priv)(void *data, void *cur, void *prev); | ||
43 | }; | ||
44 | typedef struct _Evas_Frame Evas_Frame; | ||
45 | |||
46 | |||
47 | struct _Evas_FrameQ | ||
48 | { | ||
49 | int initialised; | ||
50 | Evas_Frame *frames; | ||
51 | Eina_Condition cond_new; | ||
52 | Eina_Condition cond_ready; | ||
53 | Eina_Condition cond_done; | ||
54 | LK(mutex); | ||
55 | |||
56 | int thread_num; | ||
57 | Thinfo thinfo[TH_MAX]; | ||
58 | int frameq_sz; | ||
59 | |||
60 | Evas_Frame *cur_frame; | ||
61 | }; | ||
62 | typedef struct _Evas_FrameQ Evas_FrameQ; | ||
63 | #define FRAMEQ_SZ_PER_THREAD 2 | ||
64 | |||
65 | struct _Evas_Frameq_Thread_Info | ||
66 | { | ||
67 | Evas_FrameQ *frameq; | ||
68 | }; | ||
69 | typedef struct _Evas_Frameq_Thread_Info Evas_Frameq_Thread_Info; | ||
70 | |||
71 | EAPI Evas_Surface *evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h); | ||
72 | EAPI void evas_common_frameq_add_surface(Evas_Surface *surface); | ||
73 | EAPI void evas_common_frameq_set_frame_data(void *data, | ||
74 | void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h), | ||
75 | void (*fn_output_flush) (void *data), | ||
76 | void (*fn_output_set_priv)(void *data, void *cur, void *prev)); | ||
77 | EAPI void evas_common_frameq_prepare_frame(void); | ||
78 | EAPI void evas_common_frameq_ready_frame(void); | ||
79 | EAPI void evas_common_frameq_init(void); | ||
80 | EAPI void evas_common_frameq_destroy(void); | ||
81 | EAPI void evas_common_frameq_flush(void); | ||
82 | EAPI void evas_common_frameq_flush_ready(void); | ||
83 | EAPI int evas_common_frameq_get_frameq_sz(void); | ||
84 | EAPI int evas_common_frameq_enabled(void); | ||
85 | EAPI void evas_common_frameq_begin(void); | ||
86 | EAPI void evas_common_frameq_finish(void); | ||
87 | #endif | ||
88 | |||
89 | /* image rendering pipelines... new optional system - non-immediate and | ||
90 | * threadable | ||
91 | */ | ||
92 | |||
93 | EAPI void evas_common_pipe_free(RGBA_Image *im); | ||
94 | EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); | ||
95 | EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); | ||
96 | EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); | ||
97 | EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props); | ||
98 | EAPI void evas_common_pipe_image_load(RGBA_Image *im); | ||
99 | EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); | ||
100 | EAPI void evas_common_pipe_map_begin(RGBA_Image *root); | ||
101 | EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, | ||
102 | RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p, | ||
103 | int smooth, int level); | ||
104 | EAPI void evas_common_pipe_flush(RGBA_Image *im); | ||
105 | |||
106 | #ifdef EVAS_FRAME_QUEUING | ||
107 | EAPI void evas_common_pipe_op_text_flush(RGBA_Font *fn); | ||
108 | EAPI void evas_common_pipe_op_image_flush(RGBA_Image *im); | ||
109 | #endif | ||
110 | |||
111 | #endif /* _EVAS_PIPE_H */ | ||