summaryrefslogtreecommitdiff
path: root/fitz/dev_null.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2011-07-06 16:32:33 +0100
committerRobin Watts <Robin.Watts@artifex.com>2011-07-08 19:26:34 +0100
commit2c4bbbfdc7413a68cad395c3c61ff8e62dceb18b (patch)
treec2299029fa26028103e533c2dce15aa18d9a8d76 /fitz/dev_null.c
parent2f8acb0010c469c46682a298d66b108cc4c6cdd0 (diff)
downloadmupdf-2c4bbbfdc7413a68cad395c3c61ff8e62dceb18b.tar.xz
Clip area optimisations for displaylist case:
First, we add clipping rects to clipping functions. Various functions (the ones that handle clipping) are now additionally passed a rectangle that represents an additional bound for this clip in device space (i.e. it has already been mapped through the current ctm). Next, when constructing the displaylist, keep track of the bounding box for the contents of each clip. While writing the list, on every node we add, we add the bbox for that node to the enclosing clips content bbox (if there is an enclosing clip). When we pop a clip, write back to the corresponding push to update the bbox. This means if we get large clip regions, with only small areas used within them, we will only do the slow blending for those small areas. Finally, we fix a calculation in fz_bound_path which was incorrectly accounting for mitrelimits. This was showing up in testing on page 630 of the PDF reference v1.7.
Diffstat (limited to 'fitz/dev_null.c')
-rw-r--r--fitz/dev_null.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fitz/dev_null.c b/fitz/dev_null.c
index f81b330c..4d40ef73 100644
--- a/fitz/dev_null.c
+++ b/fitz/dev_null.c
@@ -35,17 +35,17 @@ fz_stroke_path(fz_device *dev, fz_path *path, fz_stroke_state *stroke, fz_matrix
}
void
-fz_clip_path(fz_device *dev, fz_path *path, int even_odd, fz_matrix ctm)
+fz_clip_path(fz_device *dev, fz_path *path, fz_rect *rect, int even_odd, fz_matrix ctm)
{
if (dev->clip_path)
- dev->clip_path(dev->user, path, even_odd, ctm);
+ dev->clip_path(dev->user, path, rect, even_odd, ctm);
}
void
-fz_clip_stroke_path(fz_device *dev, fz_path *path, fz_stroke_state *stroke, fz_matrix ctm)
+fz_clip_stroke_path(fz_device *dev, fz_path *path, fz_rect *rect, fz_stroke_state *stroke, fz_matrix ctm)
{
if (dev->clip_stroke_path)
- dev->clip_stroke_path(dev->user, path, stroke, ctm);
+ dev->clip_stroke_path(dev->user, path, rect, stroke, ctm);
}
void
@@ -115,10 +115,10 @@ fz_fill_image_mask(fz_device *dev, fz_pixmap *image, fz_matrix ctm,
}
void
-fz_clip_image_mask(fz_device *dev, fz_pixmap *image, fz_matrix ctm)
+fz_clip_image_mask(fz_device *dev, fz_pixmap *image, fz_rect *rect, fz_matrix ctm)
{
if (dev->clip_image_mask)
- dev->clip_image_mask(dev->user, image, ctm);
+ dev->clip_image_mask(dev->user, image, rect, ctm);
}
void