aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-06-12 10:24:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-12 10:24:21 -0700
commite61c411c1258a323a010558c08de3d9f8d170dca (patch)
tree295c5f7a9ec0001daf7b87e2573e9f74ffbe3d3b /include
parentb205d09b296e01f1c4debdf7f60d2f3e4cd2ea43 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/core/SkStrokeRec.h4
-rw-r--r--include/gpu/GrContext.h1
2 files changed, 5 insertions, 0 deletions
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;
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index c909907bfc..acf146f575 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -15,6 +15,7 @@
#include "GrRenderTarget.h"
#include "GrTexture.h"
#include "SkMatrix.h"
+#include "SkPathEffect.h"
#include "SkTypes.h"
class GrAARectRenderer;