[cairo-commit] cairo-benchmarks ChangeLog, 1.1, 1.2 Makefile,
1.1.1.1, 1.2 add.c, 1.1.1.1, 1.2 curves.c, 1.1.1.1,
1.2 downsample-bilinear.c, 1.1.1.1, 1.2 downsample-nearest.c,
1.1.1.1, 1.2 gradients-linear.c, 1.1.1.1, 1.2 lines.c, 1.1.1.1,
1.2 multiple-clip-rectangles.c, 1.1.1.1, 1.2 over-clipped.c,
1.1.1.1, 1.2 over.c, 1.1.1.1, 1.2 setup.h, 1.1.1.1,
NONE textpath.c, 1.1.1.1, 1.2 texturedtext.c, 1.1.1.1,
1.2 tools.c, 1.1.1.1, 1.2 upsample-bilinear.c, 1.1.1.1,
1.2 upsample-nearest.c, 1.1.1.1, 1.2
Billy Biggs
commit at pdx.freedesktop.org
Mon Aug 29 19:39:27 PDT 2005
- Previous message: [cairo-commit] cairo-benchmarks memcpy-helper.c,1.1.1.1,1.2
- Next message: [cairo-commit]
cairo-benchmarks .cvsignore, NONE, 1.1 ChangeLog, 1.2,
1.3 Makefile, 1.2, 1.3 remenic-gradient.c, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: vektor
Update of /cvs/cairo/cairo-benchmarks
In directory gabe:/tmp/cvs-serv28282
Modified Files:
ChangeLog Makefile add.c curves.c downsample-bilinear.c
downsample-nearest.c gradients-linear.c lines.c
multiple-clip-rectangles.c over-clipped.c over.c textpath.c
texturedtext.c tools.c upsample-bilinear.c upsample-nearest.c
Removed Files:
setup.h
Log Message:
* Makefile: Add the multiple-clip-rectangles test.
* multiple-clip-rectangles.c: (test), (main): Make this
a real test case.
* setup.h: Ditch this, it just makes the tests less
self-contained.
* tools.c: Put the USE_REALTIME_PRIORITY toggle here.
* add.c: (test), (main):
* curves.c: (test), (main):
* downsample-bilinear.c: (test), (main):
* downsample-nearest.c: (test), (main):
* gradients-linear.c: (test), (main):
* lines.c: (test), (main):
* over-clipped.c: (test), (main):
* over.c: (test), (main):
* textpath.c: (test), (main):
* texturedtext.c: (test), (main):
* upsample-bilinear.c: (test), (main):
* upsample-nearest.c: (test), (main): Make all of the tests
more independent by dropping setup.h.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ChangeLog 19 Aug 2005 04:20:08 -0000 1.1
+++ ChangeLog 30 Aug 2005 02:39:24 -0000 1.2
@@ -1,3 +1,32 @@
+2005-08-29 Billy Biggs <vektor at dumbterm.net>
+
+ * Makefile: Add the multiple-clip-rectangles test.
+ * multiple-clip-rectangles.c: (test), (main): Make this
+ a real test case.
+
+ * setup.h: Ditch this, it just makes the tests less
+ self-contained.
+
+ * tools.c: Put the USE_REALTIME_PRIORITY toggle here.
+
+ * add.c: (test), (main):
+ * curves.c: (test), (main):
+ * downsample-bilinear.c: (test), (main):
+ * downsample-nearest.c: (test), (main):
+ * gradients-linear.c: (test), (main):
+ * lines.c: (test), (main):
+ * over-clipped.c: (test), (main):
+ * over.c: (test), (main):
+ * textpath.c: (test), (main):
+ * texturedtext.c: (test), (main):
+ * upsample-bilinear.c: (test), (main):
+ * upsample-nearest.c: (test), (main): Make all of the tests
+ more independent by dropping setup.h.
+
+2005-08-29 Billy Biggs <vektor at dumbterm.net>
+
+ * memcpy-helper.c: Make it more useful.
+
2005-08-19 Billy Biggs <vektor at dumbterm.net>
* 256x256-alphagreen.png:
Index: Makefile
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Makefile 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ Makefile 30 Aug 2005 02:39:24 -0000 1.2
@@ -20,6 +20,8 @@
curves-xlib \
gradients-linear \
gradients-linear-xlib \
+ multiple-clip-rectangles \
+ multiple-clip-rectangles-xlib \
textpath \
textpath-xlib \
texturedtext \
Index: add.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/add.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- add.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ add.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 640;
-static int height = 480;
+#define WIDTH 640
+#define HEIGHT 480
+#define NUM_RUNS 64
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
pattern = cairo_pattern_create_for_surface (image);
@@ -35,7 +35,7 @@
rdtscll (before);
cairo_set_operator (cr, CAIRO_OPERATOR_ADD);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
rdtscll (after);
@@ -59,7 +59,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
Index: curves.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/curves.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- curves.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ curves.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 512;
-static int height = 512;
+#define NUM_RUNS 64
+#define WIDTH 512
+#define HEIGHT 512
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -25,7 +25,7 @@
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_set_line_width (cr, 1.0);
@@ -33,11 +33,11 @@
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
rdtscll (before);
- for (i = 0; i < width + 1; i += 8) {
- cairo_move_to (cr, i + 0.5, (height / 2) + 0.5);
+ for (i = 0; i < WIDTH + 1; i += 8) {
+ cairo_move_to (cr, i + 0.5, (HEIGHT / 2) + 0.5);
cairo_curve_to (cr, i + 4.5, (i * 2) + 0.5,
- i + 4.5, height - (i * 2) - 0.5,
- i + 8.5, (height / 2) + 0.5);
+ i + 4.5, HEIGHT - (i * 2) - 0.5,
+ i + 8.5, (HEIGHT / 2) + 0.5);
cairo_stroke (cr);
}
rdtscll (after);
@@ -52,7 +52,7 @@
cairo_surface_t *surface;
int j;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
fprintf (stderr, "Testing curves...\n");
test (surface);
Index: downsample-bilinear.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/downsample-bilinear.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- downsample-bilinear.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ downsample-bilinear.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 64;
-static int height = 64;
+#define NUM_RUNS 64
+#define WIDTH 64
+#define HEIGHT 64
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_scale (cr, 1.0 / 8.0, 1.0 / 8.0);
@@ -59,7 +59,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
Index: downsample-nearest.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/downsample-nearest.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- downsample-nearest.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ downsample-nearest.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 64;
-static int height = 64;
+#define NUM_RUNS 64
+#define WIDTH 64
+#define HEIGHT 64
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_scale (cr, 1.0 / 8.0, 1.0 / 8.0);
@@ -59,7 +59,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
Index: gradients-linear.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/gradients-linear.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- gradients-linear.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ gradients-linear.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 512;
-static int height = 512;
+#define NUM_RUNS 64
+#define WIDTH 512
+#define HEIGHT 512
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -25,10 +25,10 @@
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
- pattern = cairo_pattern_create_linear (0.0, 0.0, width, height);
+ pattern = cairo_pattern_create_linear (0.0, 0.0, WIDTH, HEIGHT);
cairo_pattern_add_color_stop_rgba (pattern, 1, 0, 0, 0, 1);
cairo_pattern_add_color_stop_rgba (pattern, 0, 1, 1, 1, 1);
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
@@ -37,7 +37,7 @@
rdtscll (before);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
rdtscll (after);
@@ -52,7 +52,7 @@
cairo_surface_t *surface;
int j;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
fprintf (stderr, "Testing gradients-linear...\n");
test (surface);
Index: lines.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/lines.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- lines.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ lines.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 512;
-static int height = 512;
+#define NUM_RUNS 64
+#define WIDTH 512
+#define HEIGHT 512
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -25,7 +25,7 @@
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_set_line_width (cr, 1.0);
@@ -33,23 +33,23 @@
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
rdtscll (before);
- for (i = 0; i < width + 1; i += 16) {
+ for (i = 0; i < WIDTH + 1; i += 16) {
cairo_move_to (cr, 0.5, i + 0.5);
- cairo_line_to (cr, i + 0.5, height - 0.5);
+ cairo_line_to (cr, i + 0.5, HEIGHT - 0.5);
cairo_stroke (cr);
}
- for (i = 0; i < width + 1; i += 16) {
- cairo_move_to (cr, i + 0.5, height - 0.5);
- cairo_line_to (cr, width - 0.5, height - i - 0.5);
+ for (i = 0; i < WIDTH + 1; i += 16) {
+ cairo_move_to (cr, i + 0.5, HEIGHT - 0.5);
+ cairo_line_to (cr, WIDTH - 0.5, HEIGHT - i - 0.5);
cairo_stroke (cr);
}
- for (i = 0; i < width + 1; i += 16) {
- cairo_move_to (cr, width - 0.5, height - i - 0.5);
- cairo_line_to (cr, width - i - 0.5, 0.5);
+ for (i = 0; i < WIDTH + 1; i += 16) {
+ cairo_move_to (cr, WIDTH - 0.5, HEIGHT - i - 0.5);
+ cairo_line_to (cr, WIDTH - i - 0.5, 0.5);
cairo_stroke (cr);
}
- for (i = 0; i < width + 1; i += 16) {
- cairo_move_to (cr, width - i - 0.5, 0.5);
+ for (i = 0; i < WIDTH + 1; i += 16) {
+ cairo_move_to (cr, WIDTH - i - 0.5, 0.5);
cairo_line_to (cr, 0.5, i + 0.5);
cairo_stroke (cr);
}
@@ -65,7 +65,7 @@
cairo_surface_t *surface;
int j;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
fprintf (stderr, "Testing lines...\n");
test (surface);
Index: multiple-clip-rectangles.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/multiple-clip-rectangles.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- multiple-clip-rectangles.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ multiple-clip-rectangles.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -1,12 +1,70 @@
- cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
- cairo_identity_matrix (cr);
- cairo_rectangle (cr, 0.0, 0.0, width, height);
- cairo_rectangle (cr, 200.0, 200.0, 100.0, 100.0);
- cairo_clip (cr);
- cairo_new_path (cr);
- cairo_translate (cr, 0, 0);
- cairo_rectangle (cr, 0, 0, width, height);
- cairo_set_source_rgb (cr, 1.0, 0.0, 0.0);
- cairo_fill (cr);
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/time.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <cairo.h>
+#include "tools.h"
+
+#define NUM_RUNS 64
+#define WIDTH 640
+#define HEIGHT 480
+
+#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
+
+static int test (cairo_surface_t *surface)
+{
+ uint64_t before = 0;
+ uint64_t after = 0;
+ cairo_t *cr;
+
+ cr = cairo_create (surface);
+
+ rdtscll (before);
+ cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
+ cairo_identity_matrix (cr);
+ cairo_rectangle (cr, 0.0, 0.0, WIDTH, HEIGHT);
+ cairo_rectangle (cr, 200.0, 200.0, 100.0, 100.0);
+ //cairo_rectangle (cr, 0, 0, width, 200);
+ //cairo_rectangle (cr, 0, 200, 200, 100);
+ //cairo_rectangle (cr, width - 200, 200, 200, 100);
+ cairo_clip (cr);
+ cairo_new_path (cr);
+
+ cairo_translate (cr, 0, 0);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
+ cairo_set_source_rgb (cr, 1.0, 0.0, 0.0);
+ cairo_fill (cr);
+ rdtscll (after);
+
+ cairo_destroy (cr);
+
+ return (int) (after - before);
+}
+
+int main( int argc, char **argv )
+{
+ cairo_surface_t *surface;
+ int j;
+
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
+
+ fprintf (stderr, "Testing multiple clip rectangles...\n");
+ test (surface);
+ cairo_surface_write_to_png (surface, "multiple-clip-surfaces-out.png");
+
+ for (j = 0; j < NUM_RUNS; j++) {
+ int cur = test (surface);
+ fprintf (stderr, "\t%d: %d (%.2f ms)\n", j, cur,
+ get_milliseconds (cur));
+ }
+
+ cairo_surface_destroy( surface );
+ output_cleanup ();
+ return 0;
+}
+
+
Index: over-clipped.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/over-clipped.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- over-clipped.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ over-clipped.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 640;
-static int height = 480;
+#define NUM_RUNS 64
+#define WIDTH 640
+#define HEIGHT 480
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
pattern = cairo_pattern_create_for_surface (image);
@@ -38,7 +38,7 @@
rdtscll (before);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
rdtscll (after);
@@ -61,7 +61,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
Index: over.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/over.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- over.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ over.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 640;
-static int height = 480;
+#define NUM_RUNS 64
+#define WIDTH 640
+#define HEIGHT 480
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
pattern = cairo_pattern_create_for_surface (image);
@@ -35,7 +35,7 @@
rdtscll (before);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
rdtscll (after);
@@ -59,7 +59,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
--- setup.h DELETED ---
Index: textpath.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/textpath.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- textpath.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ textpath.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 512;
-static int height = 512;
+#define NUM_RUNS 64
+#define WIDTH 512
+#define HEIGHT 512
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -38,7 +38,7 @@
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_set_line_width (cr, 0.8);
@@ -70,7 +70,7 @@
cairo_surface_t *surface;
int j;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
fprintf (stderr, "Testing textpath...\n");
test (surface);
Index: texturedtext.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/texturedtext.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- texturedtext.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ texturedtext.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 512;
-static int height = 512;
+#define NUM_RUNS 64
+#define WIDTH 512
+#define HEIGHT 512
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -32,7 +32,7 @@
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
@@ -51,7 +51,7 @@
double x;
cairo_text_extents (cr, text [i], &extents);
- x = ((width - extents.width) / 2.0) + 0.5;
+ x = ((WIDTH - extents.width) / 2.0) + 0.5;
cairo_move_to (cr, x, 196.5 + (i * 128));
cairo_text_path (cr, text [i]);
@@ -72,7 +72,7 @@
cairo_surface_t *surface;
int j;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
fprintf (stderr, "Testing texturedtext...\n");
test (surface, "256x256-darkgnome.png");
Index: tools.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/tools.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- tools.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ tools.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -9,7 +9,12 @@
#include <cairo.h>
#include <cairo-xlib-xrender.h>
#include "tools.h"
-#include "setup.h"
+
+/**
+ * Set this to 1 to use realtime priority. Dangerous! This will hang your
+ * machine for the duration of the test! Infinite loop and you must reboot!
+ */
+#define USE_REALTIME_PRIORITY 0
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
Index: upsample-bilinear.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/upsample-bilinear.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- upsample-bilinear.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ upsample-bilinear.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 384;
-static int height = 384;
+#define NUM_RUNS 64
+#define WIDTH 384
+#define HEIGHT 384
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_scale (cr, 8.0, 8.0);
@@ -59,7 +59,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
Index: upsample-nearest.c
===================================================================
RCS file: /cvs/cairo/cairo-benchmarks/upsample-nearest.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- upsample-nearest.c 19 Aug 2005 03:33:19 -0000 1.1.1.1
+++ upsample-nearest.c 30 Aug 2005 02:39:24 -0000 1.2
@@ -7,10 +7,10 @@
#include <unistd.h>
#include <cairo.h>
#include "tools.h"
-#include "setup.h"
-static int width = 384;
-static int height = 384;
+#define NUM_RUNS 64
+#define WIDTH 384
+#define HEIGHT 384
#define rdtscll(val) __asm__ __volatile__("rdtsc" : "=A" (val))
@@ -26,7 +26,7 @@
cairo_set_source_rgba (cr, 0, 0, 0, 0);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
cairo_fill (cr);
cairo_scale (cr, 8.0, 8.0);
@@ -59,7 +59,7 @@
cairo_surface_t *surface;
int i;
- surface = output_create_surface (argv [0], width, height);
+ surface = output_create_surface (argv [0], WIDTH, HEIGHT);
for (i = 0; i < sizeof (filenames) / sizeof (const char *); i++) {
char input_filename [1024];
- Previous message: [cairo-commit] cairo-benchmarks memcpy-helper.c,1.1.1.1,1.2
- Next message: [cairo-commit]
cairo-benchmarks .cvsignore, NONE, 1.1 ChangeLog, 1.2,
1.3 Makefile, 1.2, 1.3 remenic-gradient.c, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list