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 class GrClip;
12 class GrContext;
13 class GrDrawContext;
14 class GrPaint;
15 class GrRenderTarget;
16 class GrStrokeInfo;
17 struct SkIRect;
18 class SkMaskFilter;
19 class SkMatrix;
20 class SkPaint;
21 class SkPath;
22 class SkPathEffect;
23 
24 
25 /**
26  *  Blur utilities.
27  */
28 namespace GrBlurUtils {
29     /**
30      * Draw a path handling the mask filter if present.
31      */
32     void drawPathWithMaskFilter(GrContext* context,
33                                 GrDrawContext* drawContext,
34                                 const GrClip& clip,
35                                 const SkPath& origSrcPath,
36                                 const SkPaint& paint,
37                                 const SkMatrix& origViewMatrix,
38                                 const SkMatrix* prePathMatrix,
39                                 const SkIRect& clipBounds,
40                                 bool pathIsMutable);
41 
42     /**
43      * Draw a path handling the mask filter. The mask filter is not optional. The path effect is
44      * optional. The GrPaint will be modified after return.
45      */
46     void drawPathWithMaskFilter(GrContext*,
47                                 GrDrawContext*,
48                                 const GrClip&,
49                                 const SkPath& path,
50                                 GrPaint*,
51                                 const SkMatrix& viewMatrix,
52                                 const SkMaskFilter*,
53                                 const SkPathEffect*,
54                                 const GrStrokeInfo&,
55                                 bool pathIsMutable);
56 
57 };
58 
59 #endif
60