summaryrefslogtreecommitdiffstatsci
path: root/src/skia-tests/fill.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2014-05-07 21:52:29 -0700
committerBryce Harrington <b.harrington@samsung.com>2014-05-08 18:30:33 -0700
commitda67ab4f1f4e7109227b66516489617c245215db (patch)
treed451577be069ee9543390af11b6984b347abbb72 /src/skia-tests/fill.cpp
parent88eb6b26d9804390cb10efaf0209faec92378b10 (diff)
fill: Expand trinary
Diffstat (limited to 'src/skia-tests/fill.cpp')
-rw-r--r--src/skia-tests/fill.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/skia-tests/fill.cpp b/src/skia-tests/fill.cpp
index 3cc6103..0bd3ef3 100644
--- a/src/skia-tests/fill.cpp
+++ b/src/skia-tests/fill.cpp
@@ -207,8 +207,15 @@ void drawSkiashapes(caskbench_context_t *ctx,kinetics_t *particles)
ctx->shape_args.center_x = x;
ctx->shape_args.center_y = y;
- ctx->shape_args.width = (ctx->shape_args.center_x) +((ctx->shape_args.width)?ctx->shape_args.width:2*r);
- ctx->shape_args.height = (ctx->shape_args.center_y) + ((ctx->shape_args.height)?ctx->shape_args.height:2*r);
+ if (ctx->shape_args.width)
+ ctx->shape_args.width = x + ctx->shape_args.width;
+ else
+ ctx->shape_args.width = x + 2*r;
+
+ if (ctx->shape_args.height)
+ ctx->shape_args.height = y + ctx->shape_args.height;
+ else
+ ctx->shape_args.height = y + 2*r;
y1 = y;
y2 = y + ctx->shape_args.height/4;