diff options
Diffstat (limited to 'src/gpu/GrStrokeInfo.h')
-rw-r--r-- | src/gpu/GrStrokeInfo.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gpu/GrStrokeInfo.h b/src/gpu/GrStrokeInfo.h index b96ed39096..b9ba5eada1 100644 --- a/src/gpu/GrStrokeInfo.h +++ b/src/gpu/GrStrokeInfo.h @@ -33,10 +33,15 @@ public: } } + GrStrokeInfo(const SkPaint& paint, SkPaint::Style styleOverride) : + fStroke(paint, styleOverride), fDashType(SkPathEffect::kNone_DashType) { + this->init(paint); + } + + explicit GrStrokeInfo(const SkPaint& paint) : fStroke(paint), fDashType(SkPathEffect::kNone_DashType) { - const SkPathEffect* pe = paint.getPathEffect(); - this->setDashInfo(pe); + this->init(paint); } const SkStrokeRec& getStrokeRec() const { return fStroke; } @@ -79,6 +84,12 @@ public: const SkPathEffect::DashInfo& getDashInfo() const { return fDashInfo; } private: + + void init(const SkPaint& paint) { + const SkPathEffect* pe = paint.getPathEffect(); + this->setDashInfo(pe); + } + SkStrokeRec fStroke; SkPathEffect::DashType fDashType; SkPathEffect::DashInfo fDashInfo; |