[cairo-commit] util/cairo-trace

Chris Wilson ickle at kemper.freedesktop.org
Tue Nov 4 07:09:46 PST 2008


 util/cairo-trace/trace.c |   27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 068d465bb3541cc0ffc3cb9daa0848365c0a6a24
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Nov 4 14:57:21 2008 +0000

    [trace] Fix emission of cairo_scaled_font_create()
    
    In the case where the font face was no longer on the operand stack, the
    font face would not have been passed to cairo_scaled_font_create().

diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 680a6b9..b958e75 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -2089,26 +2089,25 @@ cairo_scaled_font_create (cairo_font_face_t *font_face,
 	options != NULL
 	&& _write_lock ())
     {
-	font_face_id = _get_font_face_id (font_face);
-
-	if (_pop_operands_to (FONT_FACE, font_face)) {
+	if (_pop_operands_to (FONT_FACE, font_face))
 	    _consume_operand ();
-	    _emit_matrix (font_matrix);
-	    fprintf (logfile, " ");
-	    _emit_matrix (ctm);
-	    fprintf (logfile, " ");
-	} else {
-	    _emit_matrix (font_matrix);
-	    fprintf (logfile, " ");
-	    _emit_matrix (ctm);
-	    fprintf (logfile, " ");
-	    _emit_font_options (options);
-	}
+	else
+	    fprintf (logfile, "f%ld ", _get_font_face_id (font_face));
+
+	_emit_matrix (font_matrix);
+	fprintf (logfile, " ");
+
+	_emit_matrix (ctm);
+	fprintf (logfile, " ");
+
 	_emit_font_options (options);
+
 	fprintf (logfile, "  scaled_font dup /sf%ld exch def\n",
 		 scaled_font_id);
+
 	_get_object (SCALED_FONT, ret)->defined = true;
 	_push_operand (SCALED_FONT, ret);
+
 	_write_unlock ();
     }
 


More information about the cairo-commit mailing list