diff options
author | Peter Larabell <xgl.asyliax@gmail.com> | 2012-07-10 02:57:23 +0400 |
---|---|---|
committer | Peter Larabell <xgl.asyliax@gmail.com> | 2012-07-10 02:57:23 +0400 |
commit | 689403bf578116bc520f208ea332c72378411d91 (patch) | |
tree | ca951b199b20966da456e4b8c65481008f4a32cf /intern/raskter/raskter.h | |
parent | f3fa96303bf98118d4921640d82e629e97c28ee5 (diff) |
updating raskter to support tiles compositor. this commit puts in some groundwork code to support tiles's pixel processor
Diffstat (limited to 'intern/raskter/raskter.h')
-rw-r--r-- | intern/raskter/raskter.h | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/intern/raskter/raskter.h b/intern/raskter/raskter.h index e078b0d26be..676bb56a2ae 100644 --- a/intern/raskter/raskter.h +++ b/intern/raskter/raskter.h @@ -27,27 +27,64 @@ /** \file raskter.h * \ingroup RASKTER */ +/* from BLI_utildefines.h */ +#define MIN2(x, y) ( (x) < (y) ? (x) : (y) ) +#define MAX2(x, y) ( (x) > (y) ? (x) : (y) ) +#define ABS(a) ( (a) < 0 ? (-(a)) : (a) ) struct poly_vert { - int x; - int y; + int x; + int y; }; struct scan_line { - int xstart; - int xend; + int xstart; + int xend; }; struct scan_line_batch { - int num; - int ystart; - struct scan_line *slines; + int num; + int ystart; + struct scan_line *slines; +}; + +struct e_status { + int x; + int ybeg; + int xshift; + int xdir; + int drift; + int drift_inc; + int drift_dec; + int num; + struct e_status *e_next; +}; + +struct r_buffer_stats { + float *buf; + int sizex; + int sizey; + int ymin; + int ymax; + int xmin; + int xmax; +}; + +struct r_fill_context { + struct e_status *all_edges, *possible_edges; + struct r_buffer_stats rb; + struct scan_line *bounds; + void *kdo; //only used with kd tree + void *kdi; //only used with kd tree + int *bound_indexes; + int bounds_length; }; #ifdef __cplusplus extern "C" { #endif +static void preprocess_all_edges(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts, struct e_status *open_edge); int PLX_raskterize(float (*base_verts)[2], int num_base_verts, float *buf, int buf_x, int buf_y, int do_mask_AA); int PLX_raskterize_feather(float (*base_verts)[2], int num_base_verts, |