1 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9#ifndef GrDashingEffect_DEFINED 10#define GrDashingEffect_DEFINED 11 12#include "GrTypesPriv.h" 13#include "SkPathEffect.h" 14 15class GrGpu; 16class GrDrawTarget; 17class GrPaint; 18class GrStrokeInfo; 19 20class GrGLDashingEffect; 21class SkPath; 22 23namespace GrDashingEffect { 24 bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStrokeInfo& strokeInfo, 25 GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm); 26 27 /** 28 * An effect that renders a dashed line. It is intended to be used as a coverage effect. 29 * The effect is meant for dashed lines that only have a single on/off interval pair. 30 * Bounding geometry is rendered and the effect computes coverage based on the fragment's 31 * position relative to the dashed line. 32 */ 33 GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info, 34 SkScalar strokeWidth); 35} 36 37#endif 38