From e61c411c1258a323a010558c08de3d9f8d170dca Mon Sep 17 00:00:00 2001 From: egdaniel Date: Thu, 12 Jun 2014 10:24:21 -0700 Subject: Use vertex attributes for dash effect in gpu This will allow us to batch dashed lines together when drawing. Also, this removes the need for a coord transform matrix in the shader, thus we save the cost of uploading a new matrix uniform everytime we do a simple transform to the dashed line we are drawing. BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/326103002 --- include/core/SkStrokeRec.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/core/SkStrokeRec.h') diff --git a/include/core/SkStrokeRec.h b/include/core/SkStrokeRec.h index 1e0ec880f7..42bed8cbe7 100644 --- a/include/core/SkStrokeRec.h +++ b/include/core/SkStrokeRec.h @@ -21,6 +21,7 @@ public: SkStrokeRec(InitStyle style); SkStrokeRec(const SkStrokeRec&); + SkStrokeRec(const SkPaint&, SkPaint::Style); explicit SkStrokeRec(const SkPaint&); enum Style { @@ -90,6 +91,9 @@ public: } private: + void init(const SkPaint& paint, SkPaint::Style style); + + SkScalar fWidth; SkScalar fMiterLimit; SkPaint::Cap fCap; -- cgit v1.2.3