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 GrContext; |
15 | class GrPaint; |
16 | class GrRecordingContext; |
17 | class GrRenderTarget; |
18 | class GrRenderTargetContext; |
19 | class GrShape; |
20 | class GrStyle; |
21 | struct SkIRect; |
22 | class SkMaskFilter; |
23 | class SkMatrix; |
24 | class SkPaint; |
25 | class SkPath; |
26 | class SkPathEffect; |
27 | |
28 | |
29 | /** |
30 | * Blur utilities. |
31 | */ |
32 | namespace 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 SkMatrix& viewMatrix, |
41 | const GrShape&); |
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 GrShape&, |
51 | GrPaint&&, |
52 | const SkMatrix& viewMatrix, |
53 | const SkMaskFilter*); |
54 | }; |
55 | |
56 | #endif |
57 | |