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
13class GrClip;
14class GrContext;
15class GrPaint;
16class GrRecordingContext;
17class GrRenderTarget;
18class GrRenderTargetContext;
19class GrShape;
20class GrStyle;
21struct SkIRect;
22class SkMaskFilter;
23class SkMatrix;
24class SkPaint;
25class SkPath;
26class SkPathEffect;
27
28
29/**
30 * Blur utilities.
31 */
32namespace 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