Chromium Code Reviews| Index: src/gpu/GrStrokeInfo.h |
| diff --git a/src/gpu/GrStrokeInfo.h b/src/gpu/GrStrokeInfo.h |
| index 2bd056ea3cadba0e77d35bb50f42a9f9d0dea3af..223f4e0959de41232ef939b1f3ff0dad2f7affa8 100644 |
| --- a/src/gpu/GrStrokeInfo.h |
| +++ b/src/gpu/GrStrokeInfo.h |
| @@ -44,6 +44,15 @@ public: |
| this->init(paint); |
| } |
| + GrStrokeInfo& operator=(const GrStrokeInfo& other) { |
| + fStroke = other.fStroke; |
| + fDashInfo = other.fDashInfo; |
| + fDashType = other.fDashType; |
| + fIntervals.reset(other.dashCount()); |
| + memcpy(fIntervals.get(), other.fIntervals.get(), other.dashCount() * sizeof(SkScalar)); |
| + return *this; |
| + } |
| + |
| const SkStrokeRec& getStrokeRec() const { return fStroke; } |
| SkStrokeRec* getStrokeRecPtr() { return &fStroke; } |
| @@ -73,6 +82,8 @@ public: |
| return (!fStroke.isFillStyle() && SkPathEffect::kDash_DashType == fDashType); |
| } |
| + bool isFillStyle() const { return fStroke.isFillStyle(); } |
| + |
| int32_t dashCount() const { |
| return fDashInfo.fCount; |
| } |
| @@ -83,6 +94,8 @@ public: |
| const SkPathEffect::DashInfo& getDashInfo() const { return fDashInfo; } |
| + bool applyDash(SkPath* dst, GrStrokeInfo* dstStrokeInfo, const SkPath& src) const; |
|
bsalomon
2015/04/24 15:56:46
Maybe a comment that if this returns false, then t
Kimmo Kinnunen
2015/04/27 06:12:25
Done.
|
| + |
| private: |
| void init(const SkPaint& paint) { |