diff options
Diffstat (limited to 'chromium/third_party/skia/src/gpu/effects/GrDashingEffect.h')
-rw-r--r-- | chromium/third_party/skia/src/gpu/effects/GrDashingEffect.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chromium/third_party/skia/src/gpu/effects/GrDashingEffect.h b/chromium/third_party/skia/src/gpu/effects/GrDashingEffect.h new file mode 100644 index 00000000000..809601778f2 --- /dev/null +++ b/chromium/third_party/skia/src/gpu/effects/GrDashingEffect.h @@ -0,0 +1,37 @@ + +/* + * Copyright 2014 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrDashingEffect_DEFINED +#define GrDashingEffect_DEFINED + +#include "GrTypesPriv.h" +#include "SkPathEffect.h" + +class GrGpu; +class GrDrawTarget; +class GrPaint; +class GrStrokeInfo; + +class GrGLDashingEffect; +class SkPath; + +namespace GrDashingEffect { + bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStrokeInfo& strokeInfo, + GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm); + + /** + * An effect that renders a dashed line. It is intended to be used as a coverage effect. + * The effect is meant for dashed lines that only have a single on/off interval pair. + * Bounding geometry is rendered and the effect computes coverage based on the fragment's + * position relative to the dashed line. + */ + GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info, + SkScalar strokeWidth); +} + +#endif |