summaryrefslogtreecommitdiff
path: root/util/cairo-trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cairo-trace/trace.c')
-rw-r--r--util/cairo-trace/trace.c114
1 files changed, 86 insertions, 28 deletions
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index a6de76f1a..65f8fbac7 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -3625,7 +3625,7 @@ cairo_surface_create_similar_image (cairo_surface_t *other,
cairo_surface_t *
cairo_surface_map_to_image (cairo_surface_t *surface,
- const cairo_rectangle_t *extents)
+ const cairo_rectangle_int_t *extents)
{
cairo_surface_t *ret;
@@ -3638,18 +3638,14 @@ cairo_surface_map_to_image (cairo_surface_t *surface,
Object *obj = _create_surface (ret);
if (extents) {
- _trace_printf ("[ %f %f %f %f ] map-to-image dup /s%ld exch def\n",
+ _trace_printf ("[%d %d %d %d] map-to-image\n",
extents->x, extents->y,
- extents->width,
- extents->height,
- obj->token);
- obj->width = extents->width;
+ extents->width, extents->height);
+ obj->width = extents->width;
obj->height = extents->height;
} else {
- _trace_printf ("[ ] map-to-image dup /s%ld exch def\n",
- obj->token);
+ _trace_printf ("[ ] map-to-image\n");
}
- obj->defined = TRUE;
_push_object (obj);
_write_unlock ();
}
@@ -3669,6 +3665,7 @@ cairo_surface_unmap_image (cairo_surface_t *surface,
_trace_printf ("/s%ld /s%ld unmap-image\n",
_get_surface_id (surface),
_get_surface_id (image));
+ _consume_operand ();
_write_unlock ();
}
@@ -4892,24 +4889,52 @@ cairo_script_surface_create_for_target (cairo_device_t *device,
#endif
#if CAIRO_HAS_TEST_SURFACES
-#include <test-fallback-surface.h>
+#include <test-paginated-surface.h>
+cairo_surface_t *
+_cairo_test_paginated_surface_create (cairo_surface_t *surface)
+{
+ cairo_surface_t *ret;
+
+ _enter_trace ();
+
+ ret = DLCALL (_cairo_test_paginated_surface_create, surface);
+
+ _emit_line_info ();
+ if (_write_lock ()) {
+ Object *obj = _create_surface (ret);
+
+ /* XXX store initial data? */
+ _trace_printf ("dict\n"
+ " /type /test-paginated set\n"
+ " /target s%ld set\n"
+ " surface dup /s%ld exch def\n",
+ _get_surface_id (surface),
+ obj->token);
+ _push_object (obj);
+ _write_unlock ();
+ }
+
+ _exit_trace ();
+ return ret;
+}
+
+#include <test-compositor-surface.h>
+
cairo_surface_t *
-_cairo_test_fallback_surface_create (cairo_content_t content,
- int width,
- int height)
+_cairo_test_fallback_compositor_surface_create (cairo_content_t content, int width, int height)
{
cairo_surface_t *ret;
_enter_trace ();
- ret = DLCALL (_cairo_test_fallback_surface_create, content, width, height);
+ ret = DLCALL (_cairo_test_fallback_compositor_surface_create, content, width, height);
_emit_line_info ();
if (_write_lock ()) {
Object *obj = _create_surface (ret);
_trace_printf ("dict\n"
- " /type /test-fallback set\n"
+ " /type /test-fallback-compositor set\n"
" /content //%s set\n"
" /width %d set\n"
" /height %d set\n"
@@ -4917,8 +4942,6 @@ _cairo_test_fallback_surface_create (cairo_content_t content,
_content_to_string (content),
width, height,
obj->token);
- obj->width = width;
- obj->height = height;
obj->defined = TRUE;
_push_object (obj);
_write_unlock ();
@@ -4928,27 +4951,29 @@ _cairo_test_fallback_surface_create (cairo_content_t content,
return ret;
}
-#include <test-paginated-surface.h>
cairo_surface_t *
-_cairo_test_paginated_surface_create (cairo_surface_t *surface)
+_cairo_test_mask_compositor_surface_create (cairo_content_t content, int width, int height)
{
cairo_surface_t *ret;
_enter_trace ();
- ret = DLCALL (_cairo_test_paginated_surface_create, surface);
+ ret = DLCALL (_cairo_test_mask_compositor_surface_create, content, width, height);
_emit_line_info ();
if (_write_lock ()) {
Object *obj = _create_surface (ret);
- /* XXX store initial data? */
_trace_printf ("dict\n"
- " /type /test-paginated set\n"
- " /target s%ld set\n"
+ " /type /test-mask-compositor set\n"
+ " /content //%s set\n"
+ " /width %d set\n"
+ " /height %d set\n"
" surface dup /s%ld exch def\n",
- _get_surface_id (surface),
+ _content_to_string (content),
+ width, height,
obj->token);
+ obj->defined = TRUE;
_push_object (obj);
_write_unlock ();
}
@@ -4957,26 +4982,58 @@ _cairo_test_paginated_surface_create (cairo_surface_t *surface)
return ret;
}
+cairo_surface_t *
+_cairo_test_spans_compositor_surface_create (cairo_content_t content, int width, int height)
+{
+ cairo_surface_t *ret;
+
+ _enter_trace ();
+
+ ret = DLCALL (_cairo_test_spans_compositor_surface_create, content, width, height);
+
+ _emit_line_info ();
+ if (_write_lock ()) {
+ Object *obj = _create_surface (ret);
+
+ _trace_printf ("dict\n"
+ " /type /test-spans-compositor set\n"
+ " /content //%s set\n"
+ " /width %d set\n"
+ " /height %d set\n"
+ " surface dup /s%ld exch def\n",
+ _content_to_string (content),
+ width, height,
+ obj->token);
+ obj->defined = TRUE;
+ _push_object (obj);
+ _write_unlock ();
+ }
+
+ _exit_trace ();
+ return ret;
+}
-#include <test-null-surface.h>
cairo_surface_t *
-_cairo_test_null_surface_create (cairo_content_t content)
+_cairo_test_traps_compositor_surface_create (cairo_content_t content, int width, int height)
{
cairo_surface_t *ret;
_enter_trace ();
- ret = DLCALL (_cairo_test_null_surface_create, content);
+ ret = DLCALL (_cairo_test_traps_compositor_surface_create, content, width, height);
_emit_line_info ();
if (_write_lock ()) {
Object *obj = _create_surface (ret);
_trace_printf ("dict\n"
- " /type /test-null set\n"
+ " /type /test-traps-compositor set\n"
" /content //%s set\n"
+ " /width %d set\n"
+ " /height %d set\n"
" surface dup /s%ld exch def\n",
_content_to_string (content),
+ width, height,
obj->token);
obj->defined = TRUE;
_push_object (obj);
@@ -4986,6 +5043,7 @@ _cairo_test_null_surface_create (cairo_content_t content)
_exit_trace ();
return ret;
}
+
#endif
cairo_surface_t *