aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBlurUtils.h
blob: 6fd981ec4b3a7baff792e3e8a2b4db6fe470b0ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * Copyright 2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GrBlurUtils_DEFINED
#define GrBlurUtils_DEFINED

#include "GrTypesPriv.h"

class GrClip;
class GrContext;
class GrPaint;
class GrRenderTarget;
class GrRenderTargetContext;
class GrStyle;
struct SkIRect;
class SkMaskFilter;
class SkMatrix;
class SkPaint;
class SkPath;
class SkPathEffect;


/**
 *  Blur utilities.
 */
namespace GrBlurUtils {
    /**
     * Draw a path handling the mask filter if present.
     */
    void drawPathWithMaskFilter(GrContext* context,
                                GrRenderTargetContext* renderTargetContext,
                                const GrClip& clip,
                                const SkPath& origSrcPath,
                                const SkPaint& paint,
                                const SkMatrix& origViewMatrix,
                                const SkMatrix* prePathMatrix,
                                const SkIRect& clipBounds,
                                bool pathIsMutable);

    /**
     * Draw a path handling the mask filter. The mask filter is not optional. The path effect is
     * optional. The GrPaint will be modified after return.
     */
    void drawPathWithMaskFilter(GrContext*,
                                GrRenderTargetContext*,
                                const GrClip&,
                                const SkPath& path,
                                GrPaint&&,
                                GrAA,
                                const SkMatrix& viewMatrix,
                                const SkMaskFilter*,
                                const GrStyle&,
                                bool pathIsMutable);
};

#endif