blob: d2f2570de0c4a743bb1db9d21ae9ffde3d4e459b [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
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/private/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;
Robert Phillips7af8fe52019-02-14 17:27:00 -050016class GrRecordingContext;
robertphillipsccb1b572015-05-27 11:02:55 -070017class GrRenderTarget;
Brian Salomon0e8fc8b2016-12-09 15:10:07 -050018class GrRenderTargetContext;
Robert Phillips27927a52018-08-20 13:18:12 -040019class GrShape;
bsalomon6663acf2016-05-10 09:14:17 -070020class GrStyle;
robertphillipsccb1b572015-05-27 11:02:55 -070021struct SkIRect;
bsalomonc55271f2015-11-09 11:55:57 -080022class SkMaskFilter;
robertphillipsccb1b572015-05-27 11:02:55 -070023class SkMatrix;
24class SkPaint;
25class SkPath;
bsalomonc55271f2015-11-09 11:55:57 -080026class SkPathEffect;
robertphillipsccb1b572015-05-27 11:02:55 -070027
28
29/**
30 * Blur utilities.
31 */
32namespace GrBlurUtils {
33 /**
Robert Phillips27927a52018-08-20 13:18:12 -040034 * Draw a shape handling the mask filter if present.
robertphillipsccb1b572015-05-27 11:02:55 -070035 */
Robert Phillips69893702019-02-22 11:16:30 -050036 void drawShapeWithMaskFilter(GrRecordingContext*,
Robert Phillips27927a52018-08-20 13:18:12 -040037 GrRenderTargetContext*,
38 const GrClip&,
39 const SkPaint&,
40 const SkMatrix& viewMatrix,
41 const GrShape&);
bsalomonc55271f2015-11-09 11:55:57 -080042
43 /**
Robert Phillips27927a52018-08-20 13:18:12 -040044 * Draw a shape handling the mask filter. The mask filter is not optional.
Robert Phillips20390c32018-08-17 11:01:03 -040045 * The GrPaint will be modified after return.
bsalomonc55271f2015-11-09 11:55:57 -080046 */
Robert Phillips7af8fe52019-02-14 17:27:00 -050047 void drawShapeWithMaskFilter(GrRecordingContext*,
Robert Phillips27927a52018-08-20 13:18:12 -040048 GrRenderTargetContext*,
49 const GrClip&,
50 const GrShape&,
51 GrPaint&&,
Robert Phillips27927a52018-08-20 13:18:12 -040052 const SkMatrix& viewMatrix,
53 const SkMaskFilter*);
robertphillipsccb1b572015-05-27 11:02:55 -070054};
55
56#endif