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

Unified Diff: src/gpu/GrStrokeInfo.h

Issue 326103002: Use vertex attributes for dash effect in gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@dashPlumb2
Patch Set: Float fix Created 6 years, 6 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 | « src/gpu/GrContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStrokeInfo.h
diff --git a/src/gpu/GrStrokeInfo.h b/src/gpu/GrStrokeInfo.h
index b96ed3909630ff6e8f5c74d3c861f9859c5285b6..b9ba5eada1a1b24dd4b16c12d4e27a43c11a9370 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;
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698