Home | History | Annotate | Download | only in ops
      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 "GrTypes.h"
     12 #include "SkPathEffect.h"
     13 
     14 class GrDrawOp;
     15 class GrPaint;
     16 class GrStyle;
     17 struct GrUserStencilSettings;
     18 
     19 namespace GrDashOp {
     20 enum class AAMode {
     21     kNone,
     22     kCoverage,
     23     kCoverageWithMSAA,
     24 };
     25 static const int kAAModeCnt = static_cast<int>(AAMode::kCoverageWithMSAA) + 1;
     26 
     27 std::unique_ptr<GrDrawOp> MakeDashLineOp(GrPaint&&, const SkMatrix& viewMatrix,
     28                                          const SkPoint pts[2], AAMode, const GrStyle& style,
     29                                          const GrUserStencilSettings*);
     30 bool CanDrawDashLine(const SkPoint pts[2], const GrStyle& style, const SkMatrix& viewMatrix);
     31 }
     32 
     33 #endif
     34