diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-05-07 22:34:47 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 18:50:51 -0700 |
| commit | 19e8a592ec8d2f72cf3171b122fc32f61d804180 (patch) | |
| tree | b7a2b870b4d0e30b17c53078dc6f660fdd120314 /src/skia-tests/fill.cpp | |
| parent | 6fb0cf79687893402bf5c8228dcc5e6e19d9d476 (diff) | |
fill: Refactor shape id determination
Diffstat (limited to 'src/skia-tests/fill.cpp')
| -rw-r--r-- | src/skia-tests/fill.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/skia-tests/fill.cpp b/src/skia-tests/fill.cpp index 6a0de82..073964b 100644 --- a/src/skia-tests/fill.cpp +++ b/src/skia-tests/fill.cpp @@ -55,13 +55,6 @@ void drawSkiashapes(caskbench_context_t *ctx, kinetics_t *particles) int old_x, old_y, old_width, old_height; shape = ctx->shape_args.shape_id; - if (!shape) - { - shape = ((4.0 * rand())/RAND_MAX) + 1; - if (!ctx->shape_args.multi_shapes) - shape = 2; - } - if (shape) { if (!(ctx->shape_args.center_x && ctx->shape_args.center_y)) @@ -76,6 +69,10 @@ void drawSkiashapes(caskbench_context_t *ctx, kinetics_t *particles) ctx->shape_args.height = 50; } ctx->shape_args.radius = r; + } else { + shape = ((4.0 * rand())/RAND_MAX) + 1; + if (!ctx->shape_args.multi_shapes) + shape = 2; } SkUnitMapper* linearMapper; |