• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
13 class GrClip;
14 class GrPaint;
15 class GrRecordingContext;
16 class GrRenderTarget;
17 class GrStyledShape;
18 class GrStyle;
19 struct SkIRect;
20 class SkMatrixProvider;
21 class SkMaskFilter;
22 class SkMatrix;
23 class SkPaint;
24 class SkPath;
25 class SkPathEffect;
26 namespace skgpu { namespace v1 { class SurfaceDrawContext; }}
27 
28 /**
29  *  Blur utilities.
30  */
31 namespace GrBlurUtils {
32     /**
33      * Draw a shape handling the mask filter if present.
34      */
35     void drawShapeWithMaskFilter(GrRecordingContext*,
36                                  skgpu::v1::SurfaceDrawContext*,
37                                  const GrClip*,
38                                  const SkPaint&,
39                                  const SkMatrixProvider&,
40                                  const GrStyledShape&);
41 
42     /**
43      * Draw a shape handling the mask filter. The mask filter is not optional.
44      * The GrPaint will be modified after return.
45      */
46     void drawShapeWithMaskFilter(GrRecordingContext*,
47                                  skgpu::v1::SurfaceDrawContext*,
48                                  const GrClip*,
49                                  const GrStyledShape&,
50                                  GrPaint&&,
51                                  const SkMatrix& viewMatrix,
52                                  const SkMaskFilter*);
53 }  // namespace GrBlurUtils
54 
55 #endif
56