diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-03-05 19:52:59 -0800 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-03-05 19:52:59 -0800 |
| commit | 69c194043ce3cbd1ea54133609f876b3244dfc9c (patch) | |
| tree | 4259b4ef9506ade794b9cfbc48e31d1aaadf4108 /src/cairo-tests/bubbles.cpp | |
| parent | b9007ed00f57df1ffc433c027da7228ef314d4a3 (diff) | |
Use same random numbers for colorization
This makes most of the tests display the same for both cairo and skia.
Diffstat (limited to 'src/cairo-tests/bubbles.cpp')
| -rw-r--r-- | src/cairo-tests/bubbles.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-tests/bubbles.cpp b/src/cairo-tests/bubbles.cpp index 235e2df..9c7fa8e 100644 --- a/src/cairo-tests/bubbles.cpp +++ b/src/cairo-tests/bubbles.cpp @@ -25,10 +25,11 @@ ca_test_bubbles(caskbench_context_t *ctx) cairo_t *cr = ctx->cairo_cr; for (i=0; i<ctx->size; i++) { + randomize_color (cr); + r = ((double)max_dim*rand())/RAND_MAX + 1; x = (0.5*(double)ctx->canvas_width*rand())/RAND_MAX; y = (0.5*(double)ctx->canvas_height*rand())/RAND_MAX; - randomize_color (cr); cairo_arc (cr, x, y, r, 0, 2*M_PI); cairo_fill (cr); } |