Flutter Engine
The Flutter Engine
|
#include "include/gpu/GrTypes.h"
Go to the source code of this file.
Enumerations | |
enum | GrStencilFlags : int { kDisabled_StencilFlag = (1 << 0) , kTestAlwaysPasses_StencilFlag = (1 << 1) , kNoModifyStencil_StencilFlag = (1 << 2) , kNoWrapOps_StencilFlag = (1 << 3) , kSingleSided_StencilFlag = (1 << 4) , kLast_StencilFlag = kSingleSided_StencilFlag , kAll_StencilFlags = kLast_StencilFlag | (kLast_StencilFlag - 1) } |
enum class | GrUserStencilTest : uint16_t { kAlwaysIfInClip , kEqualIfInClip , kLessIfInClip , kLEqualIfInClip , kAlways , kNever , kGreater , kGEqual , kLess , kLEqual , kEqual , kNotEqual } |
enum class | GrUserStencilOp : uint8_t { kKeep , kZero , kReplace , kInvert , kIncWrap , kDecWrap , kIncMaybeClamp , kDecMaybeClamp , kZeroClipBit , kSetClipBit , kInvertClipBit , kSetClipAndReplaceUserBits , kZeroClipAndUserBits } |
Variables | |
static constexpr GrUserStencilTest | kLastClippedStencilTest = GrUserStencilTest::kLEqualIfInClip |
static constexpr int | kGrUserStencilTestCount = 1 + (int)GrUserStencilTest::kNotEqual |
static constexpr GrUserStencilOp | kLastUserOnlyStencilOp = GrUserStencilOp::kDecMaybeClamp |
static constexpr GrUserStencilOp | kLastClipOnlyStencilOp = GrUserStencilOp::kInvertClipBit |
static constexpr int | kGrUserStencilOpCount = 1 + (int)GrUserStencilOp::kZeroClipAndUserBits |
enum GrStencilFlags : int |
Gr uses the stencil buffer to implement complex clipping inside the OpsTask class. The OpsTask makes a subset of the stencil buffer bits available for other uses by external code (user bits). Client code can modify these bits. OpsTask will ignore ref, mask, and writemask bits provided by clients that fall outside the user range.
When code outside the OpsTask class uses the stencil buffer the contract is as follows:
Normal stencil funcs allow the client to pass / fail regardless of the reserved clip bits. Additional functions allow a test against the clip along with a limited set of tests against the user bits. Client can assume all user bits are zero initially. Client must ensure that after all its passes are finished it has only written to the color buffer in the region inside the clip. Furthermore, it must zero all user bits that were modifed (both inside and outside the clip).
Enumerator | |
---|---|
kDisabled_StencilFlag | |
kTestAlwaysPasses_StencilFlag | |
kNoModifyStencil_StencilFlag | |
kNoWrapOps_StencilFlag | |
kSingleSided_StencilFlag | |
kLast_StencilFlag | |
kAll_StencilFlags |
Definition at line 35 of file GrUserStencilSettings.h.
|
strong |
Enumerator | |
---|---|
kKeep | |
kZero | |
kReplace | |
kInvert | |
kIncWrap | |
kDecWrap | |
kIncMaybeClamp | |
kDecMaybeClamp | |
kZeroClipBit | |
kSetClipBit | |
kInvertClipBit | |
kSetClipAndReplaceUserBits | |
kZeroClipAndUserBits |
Definition at line 79 of file GrUserStencilSettings.h.
|
strong |
Enumerator | |
---|---|
kAlwaysIfInClip | |
kEqualIfInClip | |
kLessIfInClip | |
kLEqualIfInClip | |
kAlways | |
kNever | |
kGreater | |
kGEqual | |
kLess | |
kLEqual | |
kEqual | |
kNotEqual |
Definition at line 57 of file GrUserStencilSettings.h.
|
staticconstexpr |
Definition at line 104 of file GrUserStencilSettings.h.
|
staticconstexpr |
Definition at line 77 of file GrUserStencilSettings.h.
|
staticconstexpr |
Definition at line 103 of file GrUserStencilSettings.h.
|
staticconstexpr |
Definition at line 76 of file GrUserStencilSettings.h.
|
staticconstexpr |
Definition at line 102 of file GrUserStencilSettings.h.