robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 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 | |
Brian Salomon | f4a00e4 | 2018-03-23 15:15:03 -0400 | [diff] [blame] | 11 | #include "GrTypesPriv.h" |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 12 | |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 13 | class GrClip; |
| 14 | class GrContext; |
bsalomon | c55271f | 2015-11-09 11:55:57 -0800 | [diff] [blame] | 15 | class GrPaint; |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 16 | class GrRenderTarget; |
Brian Salomon | 0e8fc8b | 2016-12-09 15:10:07 -0500 | [diff] [blame] | 17 | class GrRenderTargetContext; |
Robert Phillips | 27927a5 | 2018-08-20 13:18:12 -0400 | [diff] [blame] | 18 | class GrShape; |
bsalomon | 6663acf | 2016-05-10 09:14:17 -0700 | [diff] [blame] | 19 | class GrStyle; |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 20 | struct SkIRect; |
bsalomon | c55271f | 2015-11-09 11:55:57 -0800 | [diff] [blame] | 21 | class SkMaskFilter; |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 22 | class SkMatrix; |
| 23 | class SkPaint; |
| 24 | class SkPath; |
bsalomon | c55271f | 2015-11-09 11:55:57 -0800 | [diff] [blame] | 25 | class SkPathEffect; |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 26 | |
| 27 | |
| 28 | /** |
| 29 | * Blur utilities. |
| 30 | */ |
| 31 | namespace GrBlurUtils { |
| 32 | /** |
Robert Phillips | 27927a5 | 2018-08-20 13:18:12 -0400 | [diff] [blame] | 33 | * Draw a shape handling the mask filter if present. |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 34 | */ |
Robert Phillips | 27927a5 | 2018-08-20 13:18:12 -0400 | [diff] [blame] | 35 | void drawShapeWithMaskFilter(GrContext*, |
| 36 | GrRenderTargetContext*, |
| 37 | const GrClip&, |
| 38 | const SkPaint&, |
| 39 | const SkMatrix& viewMatrix, |
| 40 | const GrShape&); |
bsalomon | c55271f | 2015-11-09 11:55:57 -0800 | [diff] [blame] | 41 | |
| 42 | /** |
Robert Phillips | 27927a5 | 2018-08-20 13:18:12 -0400 | [diff] [blame] | 43 | * Draw a shape handling the mask filter. The mask filter is not optional. |
Robert Phillips | 20390c3 | 2018-08-17 11:01:03 -0400 | [diff] [blame] | 44 | * The GrPaint will be modified after return. |
bsalomon | c55271f | 2015-11-09 11:55:57 -0800 | [diff] [blame] | 45 | */ |
Robert Phillips | 27927a5 | 2018-08-20 13:18:12 -0400 | [diff] [blame] | 46 | void drawShapeWithMaskFilter(GrContext*, |
| 47 | GrRenderTargetContext*, |
| 48 | const GrClip&, |
| 49 | const GrShape&, |
| 50 | GrPaint&&, |
Robert Phillips | 27927a5 | 2018-08-20 13:18:12 -0400 | [diff] [blame] | 51 | const SkMatrix& viewMatrix, |
| 52 | const SkMaskFilter*); |
robertphillips | ccb1b57 | 2015-05-27 11:02:55 -0700 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | #endif |