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

Unified Diff: src/core/SkStroke.cpp

Issue 2207753003: Don't leave fResScale uninitialized when constructing an SkStroke. (Closed) Base URL: https://skia.googlesource.com/skia.git/@master
Patch Set: Created 4 years, 4 months 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: src/core/SkStroke.cpp
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp
index 0f02a9449a5c13b3665faf900dd5d07260b46443..df3e0f98e176ace2c66b1ea26cd3ecd2ea46cb83 100644
--- a/src/core/SkStroke.cpp
+++ b/src/core/SkStroke.cpp
@@ -1267,6 +1267,7 @@ void SkPathStroker::cubicTo(const SkPoint& pt1, const SkPoint& pt2,
SkStroke::SkStroke() {
fWidth = SK_Scalar1;
fMiterLimit = SkPaintDefaults_MiterLimit;
+ fResScale = 1;
fCap = SkPaint::kDefault_Cap;
fJoin = SkPaint::kDefault_Join;
fDoFill = false;
@@ -1275,6 +1276,7 @@ SkStroke::SkStroke() {
SkStroke::SkStroke(const SkPaint& p) {
fWidth = p.getStrokeWidth();
fMiterLimit = p.getStrokeMiter();
+ fResScale = 1;
fCap = (uint8_t)p.getStrokeCap();
fJoin = (uint8_t)p.getStrokeJoin();
fDoFill = SkToU8(p.getStyle() == SkPaint::kStrokeAndFill_Style);
@@ -1283,6 +1285,7 @@ SkStroke::SkStroke(const SkPaint& p) {
SkStroke::SkStroke(const SkPaint& p, SkScalar width) {
fWidth = width;
fMiterLimit = p.getStrokeMiter();
+ fResScale = 1;
fCap = (uint8_t)p.getStrokeCap();
fJoin = (uint8_t)p.getStrokeJoin();
fDoFill = SkToU8(p.getStyle() == SkPaint::kStrokeAndFill_Style);
« 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