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:
parent
2aa26abe6d
commit
eebe87f7a2
@ -170,7 +170,7 @@ constexpr GradMaker gGradMakers4f[] ={
|
|||||||
class GradientsGM : public GM {
|
class GradientsGM : public GM {
|
||||||
public:
|
public:
|
||||||
GradientsGM(bool dither) : fDither(dither) {
|
GradientsGM(bool dither) : fDither(dither) {
|
||||||
//this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
|
this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -185,10 +185,10 @@ protected:
|
|||||||
|
|
||||||
SkPoint pts[2] = {
|
SkPoint pts[2] = {
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
{ SkIntToScalar(500), SkIntToScalar(500) }
|
{ SkIntToScalar(100), SkIntToScalar(100) }
|
||||||
};
|
};
|
||||||
SkShader::TileMode tm = SkShader::kClamp_TileMode;
|
SkShader::TileMode tm = SkShader::kClamp_TileMode;
|
||||||
SkRect r = { 0, 0, SkIntToScalar(500), SkIntToScalar(500) };
|
SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(100) };
|
||||||
SkPaint paint;
|
SkPaint paint;
|
||||||
paint.setAntiAlias(true);
|
paint.setAntiAlias(true);
|
||||||
paint.setDither(fDither);
|
paint.setDither(fDither);
|
||||||
@ -207,10 +207,8 @@ protected:
|
|||||||
paint.setShader(gGradMakers[j](pts, gGradData[i], tm, scale));
|
paint.setShader(gGradMakers[j](pts, gGradData[i], tm, scale));
|
||||||
canvas->drawRect(r, paint);
|
canvas->drawRect(r, paint);
|
||||||
canvas->translate(0, SkIntToScalar(120));
|
canvas->translate(0, SkIntToScalar(120));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
canvas->restore();
|
canvas->restore();
|
||||||
break;
|
|
||||||
canvas->translate(SkIntToScalar(120), 0);
|
canvas->translate(SkIntToScalar(120), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user