Brian Salomon | a6aa590 | 2016-12-16 09:32:00 -0500 | [diff] [blame] | 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 | |
Brian Salomon | 98222ac | 2017-07-12 15:27:54 -0400 | [diff] [blame] | 11 | #include "GrTypes.h" |
Brian Salomon | a6aa590 | 2016-12-16 09:32:00 -0500 | [diff] [blame] | 12 | #include "SkPathEffect.h" |
| 13 | |
Robert Phillips | 7c525e6 | 2018-06-12 10:11:12 -0400 | [diff] [blame] | 14 | class GrContext; |
Brian Salomon | 98222ac | 2017-07-12 15:27:54 -0400 | [diff] [blame] | 15 | class GrDrawOp; |
| 16 | class GrPaint; |
Brian Salomon | a6aa590 | 2016-12-16 09:32:00 -0500 | [diff] [blame] | 17 | class GrStyle; |
Brian Salomon | 98222ac | 2017-07-12 15:27:54 -0400 | [diff] [blame] | 18 | struct GrUserStencilSettings; |
Brian Salomon | a6aa590 | 2016-12-16 09:32:00 -0500 | [diff] [blame] | 19 | |
| 20 | namespace GrDashOp { |
| 21 | enum class AAMode { |
| 22 | kNone, |
| 23 | kCoverage, |
| 24 | kCoverageWithMSAA, |
| 25 | }; |
| 26 | static const int kAAModeCnt = static_cast<int>(AAMode::kCoverageWithMSAA) + 1; |
| 27 | |
Robert Phillips | 7c525e6 | 2018-06-12 10:11:12 -0400 | [diff] [blame] | 28 | std::unique_ptr<GrDrawOp> MakeDashLineOp(GrContext*, |
| 29 | GrPaint&&, |
| 30 | const SkMatrix& viewMatrix, |
| 31 | const SkPoint pts[2], |
| 32 | AAMode, |
| 33 | const GrStyle& style, |
Brian Salomon | 98222ac | 2017-07-12 15:27:54 -0400 | [diff] [blame] | 34 | const GrUserStencilSettings*); |
Brian Salomon | a6aa590 | 2016-12-16 09:32:00 -0500 | [diff] [blame] | 35 | bool CanDrawDashLine(const SkPoint pts[2], const GrStyle& style, const SkMatrix& viewMatrix); |
| 36 | } |
| 37 | |
| 38 | #endif |