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 GrDashingEffect_DEFINED 9 #define GrDashingEffect_DEFINED 10 11 #include "GrColor.h" 12 #include "GrTypesPriv.h" 13 #include "SkPathEffect.h" 14 15 class GrClip; 16 class GrDrawBatch; 17 class GrStyle; 18 19 namespace GrDashingEffect { 20 enum class AAMode { 21 kNone, 22 kCoverage, 23 kCoverageWithMSAA, 24 }; 25 static const int kAAModeCnt = static_cast<int>(AAMode::kCoverageWithMSAA) + 1; 26 27 GrDrawBatch* CreateDashLineBatch(GrColor, 28 const SkMatrix& viewMatrix, 29 const SkPoint pts[2], 30 AAMode, 31 const GrStyle& style); 32 bool CanDrawDashLine(const SkPoint pts[2], const GrStyle& style, 33 const SkMatrix& viewMatrix); 34 } 35 36 #endif 37