diff options
author | bsalomon <bsalomon@google.com> | 2016-08-19 13:41:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-19 13:41:29 -0700 |
commit | 4c54788e9298dce2b963ce288baf0d1695323e1f (patch) | |
tree | 1968df627e80e9b8cc14431f7b32480a105b8a63 /gm | |
parent | 02fa32c6d1ef4b7b05aa06df8be4add42a1712d3 (diff) |
Rename circular_arcs_circular_arcs_fill to circular_arcs_fill.
Also fix issue with second paint's alpha getting overwritten.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265643002
Review-Url: https://codereview.chromium.org/2265643002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/circulararcs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gm/circulararcs.cpp b/gm/circulararcs.cpp index 7bc40de3fa..7214b7d846 100644 --- a/gm/circulararcs.cpp +++ b/gm/circulararcs.cpp @@ -26,10 +26,11 @@ void draw_arcs(SkCanvas* canvas, std::function<void(SkPaint*)> configureStyle) { p0.setAntiAlias(aa); // Set a reasonable stroke width that configureStyle can override. p0.setStrokeWidth(15.f); - // Use alpha so we see magenta on overlap between arc and its complement. - p0.setAlpha(100); SkPaint p1 = p0; p1.setColor(SK_ColorBLUE); + // Use alpha so we see magenta on overlap between arc and its complement. + p0.setAlpha(100); + p1.setAlpha(100); configureStyle(&p0); configureStyle(&p1); @@ -64,7 +65,7 @@ void draw_arcs(SkCanvas* canvas, std::function<void(SkPaint*)> configureStyle) { #define DEF_ARC_GM(name) DEF_SIMPLE_GM(circular_arcs_##name, canvas, kW, kH) -DEF_ARC_GM(circular_arcs_fill) { +DEF_ARC_GM(fill) { auto setFill = [] (SkPaint*p) { p->setStyle(SkPaint::kFill_Style); }; draw_arcs(canvas, setFill); } |