2008-07-11 01:21:25 -07:00
|
|
|
#ifndef _EVAS_PIPE_H
|
|
|
|
#define _EVAS_PIPE_H
|
2011-01-30 02:35:37 -08:00
|
|
|
#include "language/evas_bidi_utils.h"
|
2008-07-11 01:21:25 -07:00
|
|
|
|
2010-05-21 00:10:45 -07:00
|
|
|
#ifdef BUILD_PTHREAD
|
|
|
|
typedef struct _Thinfo
|
|
|
|
{
|
|
|
|
int thread_num;
|
|
|
|
pthread_t thread_id;
|
|
|
|
pthread_barrier_t *barrier;
|
|
|
|
RGBA_Pipe_Thread_Info *info;
|
2010-10-25 04:27:17 -07:00
|
|
|
# ifdef EVAS_FRAME_QUEUING
|
2010-06-19 23:32:05 -07:00
|
|
|
void *fq_info;
|
2010-05-21 00:10:45 -07:00
|
|
|
#endif
|
|
|
|
} Thinfo;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef EVAS_FRAME_QUEUING
|
|
|
|
struct _Evas_Surface
|
|
|
|
{
|
|
|
|
EINA_INLIST;
|
|
|
|
RGBA_Image *im;
|
|
|
|
int x, y, w, h;
|
|
|
|
int dontpush; // dont push the surface out after drawing done
|
|
|
|
};
|
|
|
|
typedef struct _Evas_Surface Evas_Surface;
|
|
|
|
|
|
|
|
struct _Evas_Frame
|
|
|
|
{
|
|
|
|
EINA_INLIST;
|
|
|
|
Evas_Surface *surfaces;
|
|
|
|
void *data;
|
|
|
|
int in_process;
|
|
|
|
int ready;
|
|
|
|
int dont_schedule;
|
|
|
|
struct timeval ready_time;
|
|
|
|
|
|
|
|
void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
|
|
|
|
void (*output_flush) (void *data);
|
|
|
|
void (*output_set_priv)(void *data, void *cur, void *prev);
|
|
|
|
};
|
|
|
|
typedef struct _Evas_Frame Evas_Frame;
|
|
|
|
|
|
|
|
|
|
|
|
struct _Evas_FrameQ
|
|
|
|
{
|
|
|
|
int initialised;
|
|
|
|
Evas_Frame *frames;
|
|
|
|
pthread_cond_t cond_new;
|
|
|
|
pthread_cond_t cond_ready;
|
|
|
|
pthread_cond_t cond_done;
|
|
|
|
LK(mutex);
|
|
|
|
|
2010-06-19 23:32:05 -07:00
|
|
|
int thread_num;
|
2010-05-21 00:10:45 -07:00
|
|
|
Thinfo thinfo[TH_MAX];
|
|
|
|
int frameq_sz;
|
|
|
|
|
|
|
|
Evas_Frame *cur_frame;
|
|
|
|
};
|
|
|
|
typedef struct _Evas_FrameQ Evas_FrameQ;
|
|
|
|
#define FRAMEQ_SZ_PER_THREAD 2
|
|
|
|
|
|
|
|
struct _Evas_Frameq_Thread_Info
|
|
|
|
{
|
|
|
|
Evas_FrameQ *frameq;
|
|
|
|
};
|
|
|
|
typedef struct _Evas_Frameq_Thread_Info Evas_Frameq_Thread_Info;
|
|
|
|
|
2010-06-19 23:32:05 -07:00
|
|
|
EAPI Evas_Surface *evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h);
|
2010-05-21 00:10:45 -07:00
|
|
|
EAPI void evas_common_frameq_add_surface(Evas_Surface *surface);
|
|
|
|
EAPI void evas_common_frameq_set_frame_data(void *data,
|
2010-10-25 04:27:17 -07:00
|
|
|
void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h),
|
|
|
|
void (*fn_output_flush) (void *data),
|
|
|
|
void (*fn_output_set_priv)(void *data, void *cur, void *prev));
|
2010-06-19 23:32:05 -07:00
|
|
|
EAPI void evas_common_frameq_prepare_frame(void);
|
|
|
|
EAPI void evas_common_frameq_ready_frame(void);
|
|
|
|
EAPI void evas_common_frameq_init(void);
|
2010-10-25 04:27:17 -07:00
|
|
|
EAPI void evas_common_frameq_destroy(void);
|
2010-06-19 23:32:05 -07:00
|
|
|
EAPI void evas_common_frameq_flush(void);
|
|
|
|
EAPI void evas_common_frameq_flush_ready(void);
|
2010-10-25 04:27:17 -07:00
|
|
|
EAPI int evas_common_frameq_get_frameq_sz(void);
|
|
|
|
EAPI int evas_common_frameq_enabled(void);
|
|
|
|
EAPI void evas_common_frameq_begin(void);
|
|
|
|
EAPI void evas_common_frameq_finish(void);
|
2010-05-21 00:10:45 -07:00
|
|
|
#endif
|
2008-07-11 01:21:25 -07:00
|
|
|
|
|
|
|
/* image rendering pipelines... new optional system - non-immediate and
|
|
|
|
* threadable
|
|
|
|
*/
|
|
|
|
|
|
|
|
EAPI void evas_common_pipe_free(RGBA_Image *im);
|
|
|
|
EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
|
|
|
|
EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
|
2010-03-16 06:23:37 -07:00
|
|
|
EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
|
2011-01-30 02:36:39 -08:00
|
|
|
EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Eina_Unicode *text, const Evas_Text_Props *intl_props);
|
2010-03-24 12:07:59 -07:00
|
|
|
EAPI void evas_common_pipe_image_load(RGBA_Image *im);
|
2008-11-04 01:19:35 -08:00
|
|
|
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);
|
2011-02-06 15:52:17 -08:00
|
|
|
EAPI void evas_common_pipe_map_begin(RGBA_Image *root);
|
|
|
|
EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
|
2011-02-08 04:10:58 -08:00
|
|
|
RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p,
|
2010-03-24 09:39:39 -07:00
|
|
|
int smooth, int level);
|
2010-06-19 23:32:05 -07:00
|
|
|
EAPI void evas_common_pipe_flush(RGBA_Image *im);
|
2008-07-11 01:21:25 -07:00
|
|
|
|
2010-05-21 00:10:45 -07:00
|
|
|
#ifdef EVAS_FRAME_QUEUING
|
|
|
|
EAPI void evas_common_pipe_op_text_flush(RGBA_Font *fn);
|
|
|
|
EAPI void evas_common_pipe_op_image_flush(RGBA_Image *im);
|
|
|
|
#endif
|
|
|
|
|
2008-07-11 01:21:25 -07:00
|
|
|
#endif /* _EVAS_PIPE_H */
|