• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2014 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef GrDashOp_DEFINED
9 #define GrDashOp_DEFINED
10 
11 #include "GrColor.h"
12 #include "GrTypesPriv.h"
13 #include "SkPathEffect.h"
14 
15 class GrMeshDrawOp;
16 class GrStyle;
17 
18 namespace GrDashOp {
19 enum class AAMode {
20     kNone,
21     kCoverage,
22     kCoverageWithMSAA,
23 };
24 static const int kAAModeCnt = static_cast<int>(AAMode::kCoverageWithMSAA) + 1;
25 
26 std::unique_ptr<GrMeshDrawOp> MakeDashLineOp(GrColor, const SkMatrix& viewMatrix,
27                                              const SkPoint pts[2], AAMode, const GrStyle& style);
28 bool CanDrawDashLine(const SkPoint pts[2], const GrStyle& style, const SkMatrix& viewMatrix);
29 }
30 
31 #endif
32