blob: aef1bdba05dfdc648f0220febf5670274199a36f [file] [log] [blame]
robertphillipsccb1b572015-05-27 11:02:55 -07001/*
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
11class GrClip;
12class GrContext;
13class GrDrawContext;
bsalomonc55271f2015-11-09 11:55:57 -080014class GrPaint;
robertphillipsccb1b572015-05-27 11:02:55 -070015class GrRenderTarget;
bsalomon6663acf2016-05-10 09:14:17 -070016class GrStyle;
robertphillipsccb1b572015-05-27 11:02:55 -070017struct SkIRect;
bsalomonc55271f2015-11-09 11:55:57 -080018class SkMaskFilter;
robertphillipsccb1b572015-05-27 11:02:55 -070019class SkMatrix;
20class SkPaint;
21class SkPath;
bsalomonc55271f2015-11-09 11:55:57 -080022class SkPathEffect;
robertphillipsccb1b572015-05-27 11:02:55 -070023
24
25/**
26 * Blur utilities.
27 */
28namespace GrBlurUtils {
29 /**
30 * Draw a path handling the mask filter if present.
31 */
32 void drawPathWithMaskFilter(GrContext* context,
33 GrDrawContext* drawContext,
robertphillipsccb1b572015-05-27 11:02:55 -070034 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);
bsalomonc55271f2015-11-09 11:55:57 -080041
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*,
bsalomonc55271f2015-11-09 11:55:57 -080048 const GrClip&,
49 const SkPath& path,
50 GrPaint*,
51 const SkMatrix& viewMatrix,
52 const SkMaskFilter*,
bsalomon6663acf2016-05-10 09:14:17 -070053 const GrStyle&,
robertphillips0e7029e2015-11-30 05:45:06 -080054 bool pathIsMutable);
bsalomonc55271f2015-11-09 11:55:57 -080055
robertphillipsccb1b572015-05-27 11:02:55 -070056};
57
58#endif