Flutter Engine
The Flutter Engine
GrPathStencilSettings.h
Go to the documentation of this file.
1/*
2 * Copyright 2016 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 GrPathStencilSettings_DEFINED
9#define GrPathStencilSettings_DEFINED
10
12
13////////////////////////////////////////////////////////////////////////////////
14// Stencil rules for paths
15
16////// Even/Odd
17
20 0xffff,
22 0xffff,
25 0xffff>()
26);
27
28// ok not to check clip b/c stencil pass only wrote inside clip
31 0x0000,
33 0xffff,
36 0xffff>()
37);
38
39// have to check clip b/c outside clip will always be zero.
42 0x0000,
44 0xffff,
47 0xffff>()
48);
49
50////// Winding
51
54 0xffff, 0xffff,
56 0xffff, 0xffff,
59 0xffff, 0xffff>()
60);
61
64 0x0000,
65 GrUserStencilTest::kLessIfInClip, // "0 < stencil" is equivalent to "0 != stencil".
66 0xffff,
69 0xffff>()
70);
71
74 0x0000,
76 0xffff,
79 0xffff>()
80);
81
82////// Normal render to stencil
83
84// Sometimes the default path renderer can draw a path directly to the stencil
85// buffer without having to first resolve the interior / exterior.
88 0x0000,
90 0xffff,
93 0xffff>()
94);
95
96#endif
static constexpr GrUserStencilSettings gEOStencilPass(GrUserStencilSettings::StaticInit< 0xffff, GrUserStencilTest::kAlwaysIfInClip, 0xffff, GrUserStencilOp::kInvert, GrUserStencilOp::kKeep, 0xffff >())
static constexpr GrUserStencilSettings gWindColorPass(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kLessIfInClip, 0xffff, GrUserStencilOp::kZero, GrUserStencilOp::kZero, 0xffff >())
static constexpr GrUserStencilSettings gInvEOColorPass(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kEqualIfInClip, 0xffff, GrUserStencilOp::kZero, GrUserStencilOp::kZero, 0xffff >())
static constexpr GrUserStencilSettings gInvWindColorPass(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kEqualIfInClip, 0xffff, GrUserStencilOp::kZero, GrUserStencilOp::kZero, 0xffff >())
static constexpr GrUserStencilSettings gDirectToStencil(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kAlwaysIfInClip, 0xffff, GrUserStencilOp::kZero, GrUserStencilOp::kIncMaybeClamp, 0xffff >())
static constexpr GrUserStencilSettings gEOColorPass(GrUserStencilSettings::StaticInit< 0x0000, GrUserStencilTest::kNotEqual, 0xffff, GrUserStencilOp::kZero, GrUserStencilOp::kZero, 0xffff >())
static constexpr GrUserStencilSettings gWindStencilPass(GrUserStencilSettings::StaticInitSeparate< 0xffff, 0xffff, GrUserStencilTest::kAlwaysIfInClip, GrUserStencilTest::kAlwaysIfInClip, 0xffff, 0xffff, GrUserStencilOp::kIncWrap, GrUserStencilOp::kDecWrap, GrUserStencilOp::kKeep, GrUserStencilOp::kKeep, 0xffff, 0xffff >())
static constexpr Init< Ref, Test, TestMask, PassOp, FailOp, WriteMask > StaticInit()
static constexpr InitSeparate< CWRef, CCWRef, CWTest, CCWTest, CWTestMask, CCWTestMask, CWPassOp, CCWPassOp, CWFailOp, CCWFailOp, CWWriteMask, CCWWriteMask > StaticInitSeparate()