summaryrefslogtreecommitdiff
path: root/util/cairo-fdr
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-16 13:47:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-16 13:48:09 +0100
commit35f41d253ff09a7c144ace833901b28e961c8e14 (patch)
tree42d5ec6fd2271c9e744a0c101de37a957633c4d5 /util/cairo-fdr
parent983cfb2f54b6636b38744932122d43ef8ad7a12d (diff)
downloadcairo-35f41d253ff09a7c144ace833901b28e961c8e14.tar.gz
fdr,tee: Reorder master/slave invocation to capture death-upon-signals
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'util/cairo-fdr')
-rw-r--r--util/cairo-fdr/fdr.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/util/cairo-fdr/fdr.c b/util/cairo-fdr/fdr.c
index 209c38022..08d9c0113 100644
--- a/util/cairo-fdr/fdr.c
+++ b/util/cairo-fdr/fdr.c
@@ -85,6 +85,12 @@ fdr_sighandler (int sig)
}
static void
+fdr_urgent_sighandler (int sig)
+{
+ fdr_dump_ringbuffer ();
+}
+
+static void
fdr_atexit (void)
{
if (fdr_dump)
@@ -100,6 +106,9 @@ fdr_pending_signals (void)
initialized = 1;
signal (SIGUSR1, fdr_sighandler);
+
+ signal (SIGSEGV, fdr_urgent_sighandler);
+ signal (SIGABRT, fdr_urgent_sighandler);
atexit (fdr_atexit);
}
@@ -303,3 +312,20 @@ cairo_surface_create_similar (cairo_surface_t *surface,
return DLCALL (cairo_surface_create_similar,
surface, content, width, height);
}
+
+cairo_surface_t *
+cairo_surface_create_for_rectangle (cairo_surface_t *surface,
+ double x,
+ double y,
+ double width,
+ double height)
+{
+ cairo_surface_t *tee;
+
+ tee = fdr_surface_get_tee (surface);
+ if (tee != NULL)
+ surface = tee;
+
+ return DLCALL (cairo_surface_create_for_rectangle,
+ surface, x, y, width, height);
+}