diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-19 18:44:34 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-22 23:01:51 +0000 |
commit | b07de014eba1a482747ac235670011972a82d19d (patch) | |
tree | f49a9affe66408e99a75c2f2b28c969fcdc606be /src/cairo-spans-private.h | |
parent | e49855497e7214c21c85b03d7ab94e9e008f821b (diff) | |
download | cairo-b07de014eba1a482747ac235670011972a82d19d.tar.gz |
spans: Add a rectangular scan converter
This is a highly specialised scan converter for the relatively common
case of where the input geometry is known to be a series of rectangles.
Generally not device aligned (or else we would most likely have chosen
an even higher performance path that does not require a coverage mask),
this optimised converter can simply compute the analytical coverage by
utilising a special case Bentley-Ottmann intersection finder.
Diffstat (limited to 'src/cairo-spans-private.h')
-rw-r--r-- | src/cairo-spans-private.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cairo-spans-private.h b/src/cairo-spans-private.h index c2be867f6..e7e965621 100644 --- a/src/cairo-spans-private.h +++ b/src/cairo-spans-private.h @@ -103,6 +103,31 @@ _cairo_tor_scan_converter_create (int xmin, int ymax, cairo_fill_rule_t fill_rule); +typedef struct _cairo_rectangular_scan_converter { + cairo_scan_converter_t base; + + int xmin, xmax; + int ymin, ymax; + + struct _cairo_rectangular_scan_converter_chunk { + struct _cairo_rectangular_scan_converter_chunk *next; + void *base; + int count; + int size; + } chunks, *tail; + char buf[CAIRO_STACK_BUFFER_SIZE]; + int num_rectangles; +} cairo_rectangular_scan_converter_t; + +cairo_private void +_cairo_rectangular_scan_converter_init (cairo_rectangular_scan_converter_t *self, + const cairo_rectangle_int_t *extents); + +cairo_private cairo_status_t +_cairo_rectangular_scan_converter_add_box (cairo_rectangular_scan_converter_t *self, + const cairo_box_t *box, + int dir); + typedef struct _cairo_botor_scan_converter { cairo_scan_converter_t base; |