Fix Gradient2Bench colors so that Debug bench will run.

git-svn-id: http://skia.googlecode.com/svn/trunk@1639 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bungeman@google.com 2011-06-17 17:56:23 +00:00
parent 90405934c5
commit 6d0c02cc25

View File

@ -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);