1/*
2 * Copyright 2015 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 GrBlurUtils_DEFINED
9#define GrBlurUtils_DEFINED
10
11#include "include/private/GrTypesPriv.h"
12
13class GrClip;
14class GrPaint;
15class GrRecordingContext;
16class GrRenderTarget;
17class GrRenderTargetContext;
18class GrStyledShape;
19class GrStyle;
20struct SkIRect;
21class SkMatrixProvider;
22class SkMaskFilter;
23class SkMatrix;
24class SkPaint;
25class SkPath;
26class SkPathEffect;
27
28
29/**
30 * Blur utilities.
31 */
32namespace GrBlurUtils {
33 /**
34 * Draw a shape handling the mask filter if present.
35 */
36 void drawShapeWithMaskFilter(GrRecordingContext*,
37 GrRenderTargetContext*,
38 const GrClip*,
39 const SkPaint&,
40 const SkMatrixProvider&,
41 const GrStyledShape&);
42
43 /**
44 * Draw a shape handling the mask filter. The mask filter is not optional.
45 * The GrPaint will be modified after return.
46 */
47 void drawShapeWithMaskFilter(GrRecordingContext*,
48 GrRenderTargetContext*,
49 const GrClip*,
50 const GrStyledShape&,
51 GrPaint&&,
52 const SkMatrix& viewMatrix,
53 const SkMaskFilter*);
54} // namespace GrBlurUtils
55
56#endif
57