Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: gm/path_stroke_with_zero_length.cpp

Issue 1546363002: initialize offscreen in StrokeZeroGM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/path_stroke_with_zero_length.cpp
diff --git a/gm/path_stroke_with_zero_length.cpp b/gm/path_stroke_with_zero_length.cpp
index 6f542bac3f2ea0dde3dd77c29069fe009f053d17..f69b5f9294e733fc10053495cbd3bbcf4014a442 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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698