Index: src/core/SkStrokeRec.cpp |
diff --git a/src/core/SkStrokeRec.cpp b/src/core/SkStrokeRec.cpp |
index ce744e501b8cfebe07688ba6dc35d556b8b0540d..a4c73af2c5acdc014daaf03f3e8384e293c7fa62 100644 |
--- a/src/core/SkStrokeRec.cpp |
+++ b/src/core/SkStrokeRec.cpp |
@@ -24,7 +24,15 @@ SkStrokeRec::SkStrokeRec(const SkStrokeRec& src) { |
} |
SkStrokeRec::SkStrokeRec(const SkPaint& paint) { |
- switch (paint.getStyle()) { |
+ this->init(paint, paint.getStyle()); |
+} |
+ |
+SkStrokeRec::SkStrokeRec(const SkPaint& paint, SkPaint::Style styleOverride) { |
+ this->init(paint, styleOverride); |
+} |
+ |
+void SkStrokeRec::init(const SkPaint& paint, SkPaint::Style style) { |
+ switch (style) { |
case SkPaint::kFill_Style: |
fWidth = kStrokeRec_FillStyleWidth; |
fStrokeAndFill = false; |