aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/path_stroke_with_zero_length.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-12-28 11:15:46 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-28 11:15:46 -0800
commit636270245fb486559b0324e9bb9e794d56bc3101 (patch)
tree4ab44154bc455c93c729adc193e13a5d6b93a252 /gm/path_stroke_with_zero_length.cpp
parent93eb4b97d4b896e0e4112a79a3caa76b2e99074b (diff)
initialize offscreen in StrokeZeroGM
Diffstat (limited to 'gm/path_stroke_with_zero_length.cpp')
-rw-r--r--gm/path_stroke_with_zero_length.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gm/path_stroke_with_zero_length.cpp b/gm/path_stroke_with_zero_length.cpp
index 6f542bac3f..f69b5f9294 100644
--- a/gm/path_stroke_with_zero_length.cpp
+++ b/gm/path_stroke_with_zero_length.cpp
@@ -117,7 +117,7 @@ protected:
bool aliases[] = { false, true };
for (bool antialias : aliases) {
canvas->save();
- for (SkScalar width : widths) {
+ for (SkScalar width : widths) {
canvas->save();
SkPaint butt;
butt.setAntiAlias(antialias);
@@ -147,6 +147,7 @@ private:
SkBitmap offscreen;
offscreen.allocN32Pixels(SkScalarRoundToInt(bounds.width() + 4),
SkScalarRoundToInt(bounds.height() + 4));
+ offscreen.eraseColor(SK_ColorWHITE);
SkScalar pathX = bounds.fLeft - 2;
SkScalar pathY = bounds.fTop - 2;
SkMatrix cMatrix = canvas->getTotalMatrix();