diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-04-24 00:14:09 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-04-24 00:14:09 -0700 |
| commit | e391ae2091be6d736dee7734b0a9e4c2beaddef5 (patch) | |
| tree | ea5989326b67963bc80c7272b54d2f44b0a4a232 /src/skia-tests/fill.cpp | |
| parent | cef0f06a4d8105d31af57f3dace28d4e92cbbeb8 (diff) | |
Add cairoRandomizeColor and skiaRandomizeColor
Diffstat (limited to 'src/skia-tests/fill.cpp')
| -rw-r--r-- | src/skia-tests/fill.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/skia-tests/fill.cpp b/src/skia-tests/fill.cpp index ebfcb3f..f81a5d7 100644 --- a/src/skia-tests/fill.cpp +++ b/src/skia-tests/fill.cpp @@ -54,16 +54,6 @@ sk_teardown_fill(void) { } -void randomize_skia_color(caskbench_context_t *ctx) -{ - unsigned int red, blue, green, alpha; - red = int( 255 * (double)rand()/RAND_MAX ); - green = int( 255 * (double)rand()/RAND_MAX ); - blue = int( 255 * (double)rand()/RAND_MAX ); - alpha = int( 255 * (double)rand()/RAND_MAX ); - ctx->skia_paint->setARGB(alpha,red, green, blue ); -} - void drawSkiashapes(caskbench_context_t *ctx,kinetics_t *particles) { int i, j, x, y, r, p, shape; @@ -161,7 +151,7 @@ void drawSkiashapes(caskbench_context_t *ctx,kinetics_t *particles) 255*(ctx->shape_args.blue ? (double)ctx->shape_args.blue:(double)0) ); } else - randomize_skia_color (ctx); + skiaRandomizeColor(ctx); } else if ((strcmp(ctx->shape_args.fill_type,"solid")) == 0) { @@ -173,7 +163,7 @@ void drawSkiashapes(caskbench_context_t *ctx,kinetics_t *particles) 255*( (double)ctx->shape_args.alpha ? (double)ctx->shape_args.alpha:(double)1)); } else - randomize_skia_color (ctx); + skiaRandomizeColor(ctx); } else if (((strcmp(ctx->shape_args.fill_type,"linear-gradient")) == 0) || ((strcmp(ctx->shape_args.fill_type,"radial-gradient")) == 0)) { |