diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2007-03-08 16:52:09 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2007-03-13 05:14:18 -0400 |
commit | 85aff353ca38e607599282bc955e467df82fa01b (patch) | |
tree | 7736e718b6ae0be17e865e7c38f58b094c7f1c45 /src/cairo-path-fixed-private.h | |
parent | 1bd073a1a2951bbb09fdab6637baae0172a223f0 (diff) | |
download | cairo-85aff353ca38e607599282bc955e467df82fa01b.tar.gz |
[cairo-path-fixed] Fine-tune size of buffer
such that cairo_path_fixed_t fits in 512 bytes.
Diffstat (limited to 'src/cairo-path-fixed-private.h')
-rw-r--r-- | src/cairo-path-fixed-private.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h index 1e7355081..65401f349 100644 --- a/src/cairo-path-fixed-private.h +++ b/src/cairo-path-fixed-private.h @@ -44,7 +44,9 @@ typedef enum cairo_path_op { } __attribute__ ((packed)) cairo_path_op_t; /* Don't want 32 bits if we can avoid it. */ /* XXX Shall we just not use char instead of hoping for __attribute__ working? */ -#define CAIRO_PATH_BUF_SIZE 64 +/* make cairo_path_fixed fit a 512 bytes. about 50 items */ +#define CAIRO_PATH_BUF_SIZE ((512 - 12 * sizeof (void*)) \ + / (sizeof (cairo_point_t) + sizeof (cairo_path_op_t))) typedef struct _cairo_path_buf { struct _cairo_path_buf *next, *prev; @@ -57,13 +59,13 @@ typedef struct _cairo_path_buf { } cairo_path_buf_t; struct _cairo_path_fixed { - cairo_path_buf_t buf_head[1]; - cairo_path_buf_t *buf_tail; - cairo_point_t last_move_point; cairo_point_t current_point; unsigned int has_current_point : 1; unsigned int has_curve_to : 1; + + cairo_path_buf_t *buf_tail; + cairo_path_buf_t buf_head[1]; }; #endif /* CAIRO_PATH_FIXED_PRIVATE_H */ |