diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-17 17:56:23 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-06-17 17:56:23 +0000 |
commit | 6d0c02cc2550150eed964159ea6ec4ac5beb6ebc (patch) | |
tree | e00e1f8de8347ea7937066d42e5342ca96b40bb8 /bench | |
parent | 90405934c53dc5faa7f1f6b219a92f47f113f519 (diff) |
Fix Gradient2Bench colors so that Debug bench will run.
git-svn-id: http://skia.googlecode.com/svn/trunk@1639 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/GradientBench.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp index d10625bfce..e017732003 100644 --- a/bench/GradientBench.cpp +++ b/bench/GradientBench.cpp @@ -170,7 +170,8 @@ protected: const SkPoint pts[] = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) }; for (int i = 0; i < 1000; i++) { - SkColor colors[] = { SK_ColorBLACK, SkColorSetARGB(i, i, i, i), SK_ColorWHITE }; + const int a = i % 256; + SkColor colors[] = { SK_ColorBLACK, SkColorSetARGB(a, a, a, a), SK_ColorWHITE }; SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode); |