[cairo-commit] 3 commits - util/cairo-trace
Chris Wilson
ickle at kemper.freedesktop.org
Sat Nov 8 03:20:06 PST 2008
util/cairo-trace/trace.c | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
New commits:
commit 5badcf6e370b9808374a1fa547383b236a9dcd21
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Nov 8 11:17:34 2008 +0000
[trace] Use a string literal for the type.
In order that the string is interned and so is only allocated the once.
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 491184c..19e0d73 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -3221,7 +3221,7 @@ cairo_ps_surface_create (const char *filename, double width_in_points, double he
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (PS) set\n"
+ " /type /PS set\n"
" /filename ");
_emit_string_literal (filename, -1);
fprintf (logfile,
@@ -3251,7 +3251,7 @@ cairo_ps_surface_create_for_stream (cairo_write_func_t write_func, void *closure
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (PS) set\n"
+ " /type /PS set\n"
" /width %g set\n"
" /height %g set\n"
" surface %% s%ld\n",
@@ -3288,7 +3288,7 @@ cairo_pdf_surface_create (const char *filename, double width_in_points, double h
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (PDF) set\n"
+ " /type /PDF set\n"
" /filename ");
_emit_string_literal (filename, -1);
fprintf (logfile,
@@ -3318,7 +3318,7 @@ cairo_pdf_surface_create_for_stream (cairo_write_func_t write_func, void *closur
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (PDF) set\n"
+ " /type /PDF set\n"
" /width %g set\n"
" /height %g set\n"
" surface %% s%ld\n",
@@ -3353,7 +3353,7 @@ cairo_svg_surface_create (const char *filename, double width, double height)
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (SVG) set\n"
+ " /type /SVG set\n"
" /filename ");
_emit_string_literal (filename, -1);
fprintf (logfile,
@@ -3383,7 +3383,7 @@ cairo_svg_surface_create_for_stream (cairo_write_func_t write_func, void *closur
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (SVG) set\n"
+ " /type /SVG set\n"
" /width %g set\n"
" /height %g set\n"
" surface %% s%ld\n",
@@ -3467,7 +3467,7 @@ cairo_xlib_surface_create (Display *dpy,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (xlib) set\n"
+ " /type /xlib set\n"
" /drawable 16!%lx set\n"
" /width %d set\n"
" /height %d set\n"
@@ -3503,7 +3503,7 @@ cairo_xlib_surface_create_for_bitmap (Display *dpy,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (xlib) set\n"
+ " /type /xlib set\n"
" /drawable 16!%lx set\n"
" /width %d set\n"
" /height %d set\n"
@@ -3543,7 +3543,7 @@ cairo_xlib_surface_create_with_xrender_format (Display *dpy,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (xrender) set\n"
+ " /type /xrender set\n"
" /drawable 16!%lx set\n"
" /width %d set\n"
" /height %d set\n"
@@ -3583,7 +3583,7 @@ cairo_script_surface_create (const char *filename,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (script) set\n"
+ " /type /script set\n"
" /filename ");
_emit_string_literal (filename, -1);
fprintf (logfile,
@@ -3617,7 +3617,7 @@ cairo_script_surface_create_for_stream (cairo_write_func_t write_func,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (script) set\n"
+ " /type /script set\n"
" /width %g set\n"
" /height %g set\n"
" surface dup /s%ld exch def\n",
@@ -3648,7 +3648,7 @@ _cairo_test_fallback_surface_create (cairo_content_t content,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (test-fallback) set\n"
+ " /type /test-fallback set\n"
" /content //%s set\n"
" /width %d set\n"
" /height %d set\n"
@@ -3683,7 +3683,7 @@ _cairo_test_paginated_surface_create_for_data (unsigned char *data,
/* XXX store initial data? */
fprintf (logfile,
"dict\n"
- " /type (test-paginated) set\n"
+ " /type /test-paginated set\n"
" /content //%s set\n"
" /width %d set\n"
" /height %d set\n"
@@ -3715,7 +3715,7 @@ _cairo_test_meta_surface_create (cairo_content_t content,
if (_write_lock ()) {
fprintf (logfile,
"dict\n"
- " /type (test-meta) set\n"
+ " /type /test-meta set\n"
" /content //%s set\n"
" /width %d set\n"
" /height %d set\n"
commit 1d0faefbc8700833e9bde8a9c825b02b0f3cf910
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Nov 7 22:48:21 2008 +0000
[trace] Record the XID as a number
Don't waste string constants (which get interned) for a simple number!
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index c92215e..491184c 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -3468,7 +3468,7 @@ cairo_xlib_surface_create (Display *dpy,
fprintf (logfile,
"dict\n"
" /type (xlib) set\n"
- " /drawable /%lx set\n"
+ " /drawable 16!%lx set\n"
" /width %d set\n"
" /height %d set\n"
" surface dup /s%ld exch def\n",
@@ -3504,7 +3504,7 @@ cairo_xlib_surface_create_for_bitmap (Display *dpy,
fprintf (logfile,
"dict\n"
" /type (xlib) set\n"
- " /drawable /%lx set\n"
+ " /drawable 16!%lx set\n"
" /width %d set\n"
" /height %d set\n"
" /depth 1 set\n"
@@ -3544,7 +3544,7 @@ cairo_xlib_surface_create_with_xrender_format (Display *dpy,
fprintf (logfile,
"dict\n"
" /type (xrender) set\n"
- " /drawable /%lx set\n"
+ " /drawable 16!%lx set\n"
" /width %d set\n"
" /height %d set\n"
" /depth %d set\n"
commit 899a159b133e22f71e2a176785c91e78838c3fee
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Nov 8 11:16:03 2008 +0000
[trace] Remove stray /source
An accidental /source was pushing pushed onto the operand stack and never
used.
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index 03f7c5e..c92215e 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -2625,7 +2625,6 @@ cairo_image_surface_create_for_data (unsigned char *data, cairo_format_t format,
* is negligible.
*/
if (width * height < 128) {
- fprintf (logfile, " /source ");
_emit_image (ret, NULL);
fprintf (logfile,
" dup /s%ld exch def\n",
More information about the cairo-commit
mailing list