summaryrefslogtreecommitdiff
path: root/src/cairo-pdf-surface-private.h
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2011-09-04 20:43:07 +0930
committerAdrian Johnson <ajohnson@redneon.com>2011-09-05 21:18:36 +0930
commit37a22669d80cf970dab3aa3e7a8ec673c1462342 (patch)
tree3216594faefacb2152d7ac8548f750ee2fd19e63 /src/cairo-pdf-surface-private.h
parent6ad63946d4374ad30ef7fbdad421d85bfd8da423 (diff)
downloadcairo-37a22669d80cf970dab3aa3e7a8ec673c1462342.tar.gz
pdf: use ink extents for smask bbox
There are some inkscape bugs reporting very slow rendering of inkscape generated PDFs (inkscape uses cairo for PDF output). These bugs are caused by cairo specifying a page sized bounding box in XObjects and Patterns. PDF renderers usually use the BBox as the image size when compositing. As PDFs generated from SVG tends to use a lot of XObjects and Patterns this can lead to very long rendering times. These three patches tighten up all the BBoxes in PDF output.
Diffstat (limited to 'src/cairo-pdf-surface-private.h')
-rw-r--r--src/cairo-pdf-surface-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-pdf-surface-private.h b/src/cairo-pdf-surface-private.h
index dd1c77cb8..64bf7f0fc 100644
--- a/src/cairo-pdf-surface-private.h
+++ b/src/cairo-pdf-surface-private.h
@@ -101,6 +101,7 @@ typedef enum _cairo_pdf_operation {
typedef struct _cairo_pdf_smask_group {
double width;
double height;
+ cairo_rectangle_int_t extents;
cairo_pdf_resource_t group_res;
cairo_pdf_operation_t operation;
cairo_pattern_t *source;
@@ -174,6 +175,7 @@ struct _cairo_pdf_surface {
cairo_output_stream_t *mem_stream;
cairo_output_stream_t *old_output;
cairo_pdf_resource_t resource;
+ cairo_box_double_t bbox;
cairo_bool_t is_knockout;
} group_stream;