diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-05-07 22:40:22 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 18:50:52 -0700 |
| commit | fc54828ec880dfd76852171053e7fb0a90a2bd05 (patch) | |
| tree | ff07498c235a55b068c4dc81965532bdaebd3a3c /src/skia-tests/fill.cpp | |
| parent | 0527b8b6914cde4cfdaff1a9c1612ccbd8c8a916 (diff) | |
fill: Move variable declarations closer to their usage
Diffstat (limited to 'src/skia-tests/fill.cpp')
| -rw-r--r-- | src/skia-tests/fill.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/skia-tests/fill.cpp b/src/skia-tests/fill.cpp index a5c44ac..3362f7d 100644 --- a/src/skia-tests/fill.cpp +++ b/src/skia-tests/fill.cpp @@ -76,12 +76,7 @@ void drawSkiashapes(caskbench_context_t *ctx, kinetics_t *particles) } SkUnitMapper* linearMapper; - SkColor linearColors[2]; - SkPoint linearPoints[2]; - SkScalar radialPoints[4]; - SkPoint center; //Stroke styles - SkScalar vals[] = { SkIntToScalar(1), SkIntToScalar(1) }; if (ctx->shape_args.stroke_width) { @@ -91,6 +86,7 @@ void drawSkiashapes(caskbench_context_t *ctx, kinetics_t *particles) ctx->skia_paint->setStrokeCap((SkPaint::Cap)ctx->shape_args.cap_style); if (ctx->shape_args.dash_style == 0) { + SkScalar vals[] = { SkIntToScalar(1), SkIntToScalar(1) }; #if USE_LEGACY_SKIA_SRA pE.reset(new SkDashPathEffect(vals, 2, 0)); ctx->skia_paint->setPathEffect(new SkDashPathEffect(vals, 2, 0)); @@ -229,6 +225,10 @@ void drawSkiashapes(caskbench_context_t *ctx, kinetics_t *particles) } else if ((strcmp(ctx->shape_args.fill_type,"radial-gradient")) == 0) { + SkPoint center; + SkColor linearColors[2]; + SkScalar radialPoints[4]; + red = 255*(double)rand()/RAND_MAX; green = 255*(double)rand()/RAND_MAX; blue = 255*(double)rand()/RAND_MAX; @@ -245,6 +245,8 @@ void drawSkiashapes(caskbench_context_t *ctx, kinetics_t *particles) } else if ((strcmp(ctx->shape_args.fill_type,"linear-gradient")) == 0) { + SkColor linearColors[2]; + SkPoint linearPoints[2]; red = 255*(double)rand()/RAND_MAX; green = 255*(double)rand()/RAND_MAX; blue = 255*(double)rand()/RAND_MAX; |