aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrDashOp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ops/GrDashOp.h')
-rw-r--r--src/gpu/ops/GrDashOp.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gpu/ops/GrDashOp.h b/src/gpu/ops/GrDashOp.h
new file mode 100644
index 0000000000..56e2ba8f8b
--- /dev/null
+++ b/src/gpu/ops/GrDashOp.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrDashOp_DEFINED
+#define GrDashOp_DEFINED
+
+#include "GrColor.h"
+#include "GrTypesPriv.h"
+#include "SkPathEffect.h"
+
+class GrClip;
+class GrDrawOp;
+class GrStyle;
+
+namespace GrDashOp {
+enum class AAMode {
+ kNone,
+ kCoverage,
+ kCoverageWithMSAA,
+};
+static const int kAAModeCnt = static_cast<int>(AAMode::kCoverageWithMSAA) + 1;
+
+sk_sp<GrDrawOp> MakeDashLineOp(GrColor, const SkMatrix& viewMatrix, const SkPoint pts[2], AAMode,
+ const GrStyle& style);
+bool CanDrawDashLine(const SkPoint pts[2], const GrStyle& style, const SkMatrix& viewMatrix);
+}
+
+#endif