aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrDashingEffect.h
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 /src/gpu/effects/GrDashingEffect.h
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 'src/gpu/effects/GrDashingEffect.h')
-rw-r--r--src/gpu/effects/GrDashingEffect.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gpu/effects/GrDashingEffect.h b/src/gpu/effects/GrDashingEffect.h
index 0ed1cf031e..809601778f 100644
--- a/src/gpu/effects/GrDashingEffect.h
+++ b/src/gpu/effects/GrDashingEffect.h
@@ -12,13 +12,17 @@
#include "GrTypesPriv.h"
#include "SkPathEffect.h"
-class GrContext;
+class GrGpu;
+class GrDrawTarget;
+class GrPaint;
+class GrStrokeInfo;
class GrGLDashingEffect;
class SkPath;
namespace GrDashingEffect {
- bool DrawDashLine(const SkPoint pnts[2], const SkPaint& paint, GrContext* context);
+ bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStrokeInfo& strokeInfo,
+ GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm);
/**
* An effect that renders a dashed line. It is intended to be used as a coverage effect.
@@ -27,7 +31,7 @@ namespace GrDashingEffect {
* position relative to the dashed line.
*/
GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info,
- const SkMatrix& matrix, SkScalar strokeWidth);
+ SkScalar strokeWidth);
}
#endif