summaryrefslogtreecommitdiff
path: root/src/cairo-clip-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-23 12:19:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-23 15:33:14 +0100
commita30a7402f73485dabdb6a016178247f9844017a1 (patch)
tree54a047cbed002b2ff4c83a305019b503314da882 /src/cairo-clip-private.h
parentbff8e22eb6b7faeac04ca585cb739e7880a3335c (diff)
image: replay the recording surface directly onto the target
백현기 reported a use-case where he was recording an entire web-page onto the recording surface, in order to facilitate panning. In this scenario, where there may be lots of similar surfaces within the recording we generate thousands of unused snapshot-images bloating memory usage and impairing performance. Under the right conditions we can replay directly onto the destination which not only bypasses the snapshots but also skips the following resampling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-clip-private.h')
-rw-r--r--src/cairo-clip-private.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cairo-clip-private.h b/src/cairo-clip-private.h
index 2ad53efdc..7f44bdfc8 100644
--- a/src/cairo-clip-private.h
+++ b/src/cairo-clip-private.h
@@ -116,6 +116,18 @@ _cairo_clip_copy_intersect_rectangle (const cairo_clip_t *clip,
}
cairo_private cairo_clip_t *
+_cairo_clip_intersect_clip (cairo_clip_t *clip,
+ const cairo_clip_t *other);
+
+static inline cairo_clip_t *
+_cairo_clip_copy_intersect_clip (const cairo_clip_t *clip,
+ const cairo_clip_t *other)
+{
+ return _cairo_clip_intersect_clip (_cairo_clip_copy (clip), other);
+}
+
+
+cairo_private cairo_clip_t *
_cairo_clip_intersect_box (cairo_clip_t *clip,
const cairo_box_t *box);
@@ -151,6 +163,9 @@ cairo_private cairo_status_t
_cairo_clip_to_boxes (cairo_clip_t *clip,
cairo_boxes_t *boxes);
+cairo_private cairo_clip_t *
+_cairo_clip_from_boxes (const cairo_boxes_t *boxes);
+
cairo_private cairo_region_t *
_cairo_clip_get_region (const cairo_clip_t *clip);