blob: 6db3cd241ec5abb68ead7ed587a355fb2275cb67 [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
Brian Salomonf4a00e42018-03-23 15:15:03 -040011#include "GrTypesPriv.h"
Brian Salomon0e8fc8b2016-12-09 15:10:07 -050012
robertphillipsccb1b572015-05-27 11:02:55 -070013class GrClip;
14class GrContext;
bsalomonc55271f2015-11-09 11:55:57 -080015class GrPaint;
robertphillipsccb1b572015-05-27 11:02:55 -070016class GrRenderTarget;
Brian Salomon0e8fc8b2016-12-09 15:10:07 -050017class GrRenderTargetContext;
Robert Phillips27927a52018-08-20 13:18:12 -040018class GrShape;
bsalomon6663acf2016-05-10 09:14:17 -070019class GrStyle;
robertphillipsccb1b572015-05-27 11:02:55 -070020struct SkIRect;
bsalomonc55271f2015-11-09 11:55:57 -080021class SkMaskFilter;
robertphillipsccb1b572015-05-27 11:02:55 -070022class SkMatrix;
23class SkPaint;
24class SkPath;
bsalomonc55271f2015-11-09 11:55:57 -080025class SkPathEffect;
robertphillipsccb1b572015-05-27 11:02:55 -070026
27
28/**
29 * Blur utilities.
30 */
31namespace GrBlurUtils {
32 /**
Robert Phillips27927a52018-08-20 13:18:12 -040033 * Draw a shape handling the mask filter if present.
robertphillipsccb1b572015-05-27 11:02:55 -070034 */
Robert Phillips27927a52018-08-20 13:18:12 -040035 void drawShapeWithMaskFilter(GrContext*,
36 GrRenderTargetContext*,
37 const GrClip&,
38 const SkPaint&,
39 const SkMatrix& viewMatrix,
40 const GrShape&);
bsalomonc55271f2015-11-09 11:55:57 -080041
42 /**
Robert Phillips27927a52018-08-20 13:18:12 -040043 * Draw a shape handling the mask filter. The mask filter is not optional.
Robert Phillips20390c32018-08-17 11:01:03 -040044 * The GrPaint will be modified after return.
bsalomonc55271f2015-11-09 11:55:57 -080045 */
Robert Phillips27927a52018-08-20 13:18:12 -040046 void drawShapeWithMaskFilter(GrContext*,
47 GrRenderTargetContext*,
48 const GrClip&,
49 const GrShape&,
50 GrPaint&&,
Robert Phillips27927a52018-08-20 13:18:12 -040051 const SkMatrix& viewMatrix,
52 const SkMaskFilter*);
robertphillipsccb1b572015-05-27 11:02:55 -070053};
54
55#endif