Fix gradients gm

Some of my local changes slipped into the tree.

BUG=skia:

Change-Id: I6e452f12608db6b80c5887ccd3cac199cfbf9494
Reviewed-on: https://skia-review.googlesource.com/7625
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
This commit is contained in:
Matt Sarett 2017-01-26 15:14:56 -05:00 committed by Skia Commit-Bot
parent 2aa26abe6d
commit eebe87f7a2

View File

@ -170,7 +170,7 @@ constexpr GradMaker gGradMakers4f[] ={
class GradientsGM : public GM {
public:
GradientsGM(bool dither) : fDither(dither) {
//this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
}
protected:
@ -185,10 +185,10 @@ protected:
SkPoint pts[2] = {
{ 0, 0 },
{ SkIntToScalar(500), SkIntToScalar(500) }
{ SkIntToScalar(100), SkIntToScalar(100) }
};
SkShader::TileMode tm = SkShader::kClamp_TileMode;
SkRect r = { 0, 0, SkIntToScalar(500), SkIntToScalar(500) };
SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) };
SkPaint paint;
paint.setAntiAlias(true);
paint.setDither(fDither);
@ -207,10 +207,8 @@ protected:
paint.setShader(gGradMakers[j](pts, gGradData[i], tm, scale));
canvas->drawRect(r, paint);
canvas->translate(0, SkIntToScalar(120));
break;
}
canvas->restore();
break;
canvas->translate(SkIntToScalar(120), 0);
}
}