summaryrefslogtreecommitdiff
path: root/src/cairo-spans-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-01-19 17:11:11 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-01-22 23:01:51 +0000
commit9cd9137843f8f1c3d32bedb6510259ab3638a2c5 (patch)
tree8d2322bb4a45db782eac0aeb15d63ba754d9261c /src/cairo-spans-private.h
parenta04873c0770df5eaed078493df5216ca28322de7 (diff)
downloadcairo-9cd9137843f8f1c3d32bedb6510259ab3638a2c5.tar.gz
spans: Pass multiple rows of identical spans to the renders.
It is quite common amongst our geometry to have rows of repeated span data, for example a rounded rectangle will have repeating data between the top and bottom rounded corners. By passing the repeat length to the renderers, they may be able to use that information more efficiently, and the scan converters can avoid recomputing the same span data.
Diffstat (limited to 'src/cairo-spans-private.h')
-rw-r--r--src/cairo-spans-private.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/cairo-spans-private.h b/src/cairo-spans-private.h
index e29a567ae..af3b38ca9 100644
--- a/src/cairo-spans-private.h
+++ b/src/cairo-spans-private.h
@@ -47,26 +47,24 @@ typedef struct _cairo_half_open_span {
* surfaces if they want to composite spans instead of trapezoids. */
typedef struct _cairo_span_renderer cairo_span_renderer_t;
struct _cairo_span_renderer {
+ /* Private status variable. */
+ cairo_status_t status;
+
/* Called to destroy the renderer. */
cairo_destroy_func_t destroy;
- /* Render the spans on row y of the source by whatever compositing
- * method is required. The function should ignore spans outside
- * the bounding box set by the init() function. */
- cairo_status_t (*render_row)(
- void *abstract_renderer,
- int y,
- const cairo_half_open_span_t *coverages,
- unsigned num_coverages);
+ /* Render the spans on row y of the destination by whatever compositing
+ * method is required. */
+ cairo_warn cairo_status_t
+ (*render_rows) (void *abstract_renderer,
+ int y, int height,
+ const cairo_half_open_span_t *coverages,
+ unsigned num_coverages);
/* Called after all rows have been rendered to perform whatever
* final rendering step is required. This function is called just
* once before the renderer is destroyed. */
- cairo_status_t (*finish)(
- void *abstract_renderer);
-
- /* Private status variable. */
- cairo_status_t status;
+ cairo_status_t (*finish) (void *abstract_renderer);
};
/* Scan converter interface. */