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

Unified Diff: src/gpu/GrStrokeInfo.h

Issue 1100073003: Extract gpu line dashing to GrDashLinePathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
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) {

Powered by Google App Engine
This is Rietveld 408576698