[cairo-commit] 2 commits - test/reference util/cairo-trace

Chris Wilson ickle at kemper.freedesktop.org
Tue Sep 27 06:58:28 PDT 2011


 test/reference/clip-group-shapes-circles.ref.png      |binary
 test/reference/clip-operator.argb32.ref.png           |binary
 test/reference/clip-operator.rgb24.ref.png            |binary
 test/reference/clip-stroke.ref.png                    |binary
 test/reference/clip-twice.argb32.ref.png              |binary
 test/reference/clip-twice.rgb24.ref.png               |binary
 test/reference/hatchings.ref.png                      |binary
 test/reference/random-intersections-curves-nz.ref.png |binary
 test/reference/rotated-clip.ref.png                   |binary
 test/reference/scale-offset-image.ref.png             |binary
 test/reference/scale-offset-similar.ref.png           |binary
 test/reference/tiger.ref.png                          |binary
 util/cairo-trace/trace.c                              |   17 ++++++++++++++---
 13 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit add9a4092b69ba359917407e0e7f584c5dbfdc81
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 27 14:55:57 2011 +0100

    trace: Emit an stack operation to create a pattern from an undefined surface
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 65f8fba..7475958 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -2164,6 +2164,8 @@ cairo_set_source_surface (cairo_t *cr, cairo_surface_t *surface, double x, doubl
     _enter_trace ();
     _emit_line_info ();
     if (cr != NULL && surface != NULL && _write_lock ()) {
+	Object *obj = _get_object (SURFACE, surface);
+
 	if (_is_current (SURFACE, surface, 0) &&
 	    _is_current (CONTEXT, cr, 1))
 	{
@@ -2175,12 +2177,16 @@ cairo_set_source_surface (cairo_t *cr, cairo_surface_t *surface, double x, doubl
 	    _trace_printf ("exch ");
 	    _exch_operands ();
 	    _consume_operand ();
+	} else if (obj->defined) {
+	    _emit_context (cr);
+	    _trace_printf ("s%ld ", obj->token);
 	} else {
 	    _emit_context (cr);
-	    _trace_printf ("s%ld ", _get_surface_id (surface));
+	    _trace_printf ("%d index ",
+			   current_stack_depth - obj->operand - 1);
 	}
 
-	if (_get_object (SURFACE, surface)->foreign)
+	if (obj->foreign)
 	    _emit_source_image (surface);
 
 	_trace_printf ("pattern");
@@ -2703,6 +2709,7 @@ cairo_mask_surface (cairo_t *cr, cairo_surface_t *surface, double x, double y)
     _enter_trace ();
     _emit_line_info ();
     if (cr != NULL && surface != NULL && _write_lock ()) {
+	Object *obj = _get_object (SURFACE, surface);
 	if (_is_current (SURFACE, surface, 0) &&
 	    _is_current (CONTEXT, cr, 1))
 	{
@@ -2714,9 +2721,13 @@ cairo_mask_surface (cairo_t *cr, cairo_surface_t *surface, double x, double y)
 	    _trace_printf ("exch ");
 	    _exch_operands ();
 	    _consume_operand ();
+	} else if (obj->defined){
+	    _emit_context (cr);
+	    _trace_printf ("s%ld ", obj->token);
 	} else {
 	    _emit_context (cr);
-	    _trace_printf ("s%ld ", _get_surface_id (surface));
+	    _trace_printf ("%d index ",
+			   current_stack_depth - obj->operand - 1);
 	}
 	_trace_printf ("pattern");
 
commit b8ae60f619d030dab48995fc6cb540b7935eb5cf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 26 14:55:03 2011 +0100

    test: Refresh reference images
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/reference/clip-group-shapes-circles.ref.png b/test/reference/clip-group-shapes-circles.ref.png
index 289b323..f9710c2 100644
Binary files a/test/reference/clip-group-shapes-circles.ref.png and b/test/reference/clip-group-shapes-circles.ref.png differ
diff --git a/test/reference/clip-operator.argb32.ref.png b/test/reference/clip-operator.argb32.ref.png
index 965d921..47c16de 100644
Binary files a/test/reference/clip-operator.argb32.ref.png and b/test/reference/clip-operator.argb32.ref.png differ
diff --git a/test/reference/clip-operator.rgb24.ref.png b/test/reference/clip-operator.rgb24.ref.png
index 91f054e..8ef57e1 100644
Binary files a/test/reference/clip-operator.rgb24.ref.png and b/test/reference/clip-operator.rgb24.ref.png differ
diff --git a/test/reference/clip-stroke.ref.png b/test/reference/clip-stroke.ref.png
index bb819ce..c40fe63 100644
Binary files a/test/reference/clip-stroke.ref.png and b/test/reference/clip-stroke.ref.png differ
diff --git a/test/reference/clip-twice.argb32.ref.png b/test/reference/clip-twice.argb32.ref.png
index 68a505e..e0bdf32 100644
Binary files a/test/reference/clip-twice.argb32.ref.png and b/test/reference/clip-twice.argb32.ref.png differ
diff --git a/test/reference/clip-twice.rgb24.ref.png b/test/reference/clip-twice.rgb24.ref.png
index 35f9613..97cb680 100644
Binary files a/test/reference/clip-twice.rgb24.ref.png and b/test/reference/clip-twice.rgb24.ref.png differ
diff --git a/test/reference/hatchings.ref.png b/test/reference/hatchings.ref.png
index 449d040..a8af87c 100644
Binary files a/test/reference/hatchings.ref.png and b/test/reference/hatchings.ref.png differ
diff --git a/test/reference/random-intersections-curves-nz.ref.png b/test/reference/random-intersections-curves-nz.ref.png
index 1cbc2a4..6cd9495 100644
Binary files a/test/reference/random-intersections-curves-nz.ref.png and b/test/reference/random-intersections-curves-nz.ref.png differ
diff --git a/test/reference/rotated-clip.ref.png b/test/reference/rotated-clip.ref.png
index 1829ce3..7f3981c 100644
Binary files a/test/reference/rotated-clip.ref.png and b/test/reference/rotated-clip.ref.png differ
diff --git a/test/reference/scale-offset-image.ref.png b/test/reference/scale-offset-image.ref.png
index 1e216e5..67e1fce 100644
Binary files a/test/reference/scale-offset-image.ref.png and b/test/reference/scale-offset-image.ref.png differ
diff --git a/test/reference/scale-offset-similar.ref.png b/test/reference/scale-offset-similar.ref.png
index 1e216e5..67e1fce 100644
Binary files a/test/reference/scale-offset-similar.ref.png and b/test/reference/scale-offset-similar.ref.png differ
diff --git a/test/reference/tiger.ref.png b/test/reference/tiger.ref.png
index b31d358..1a84906 100644
Binary files a/test/reference/tiger.ref.png and b/test/reference/tiger.ref.png differ


More information about the cairo-commit mailing list