| Index: src/gpu/GrPathRendering.cpp
|
| diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp
|
| index a3bba4bc7f2a163743d0edfb776341883a2f71b5..a6623d6d41f45bda5174e65bdbd84fd84d7c0222 100644
|
| --- a/src/gpu/GrPathRendering.cpp
|
| +++ b/src/gpu/GrPathRendering.cpp
|
| @@ -12,6 +12,37 @@
|
| #include "SkTypeface.h"
|
| #include "GrPathRange.h"
|
|
|
| +const GrUserStencilSettings& GrPathRendering::GetStencilPassSettings(FillType fill) {
|
| + switch (fill) {
|
| + default:
|
| + SkFAIL("Unexpected path fill.");
|
| + case GrPathRendering::kWinding_FillType: {
|
| + constexpr static GrUserStencilSettings kWindingStencilPass(
|
| + GrUserStencilSettings::StaticInit<
|
| + 0xffff,
|
| + GrUserStencilTest::kAlwaysIfInClip,
|
| + 0xffff,
|
| + GrUserStencilOp::kIncWrap,
|
| + GrUserStencilOp::kIncWrap,
|
| + 0xffff>()
|
| + );
|
| + return kWindingStencilPass;
|
| + }
|
| + case GrPathRendering::kEvenOdd_FillType: {
|
| + constexpr static GrUserStencilSettings kEvenOddStencilPass(
|
| + GrUserStencilSettings::StaticInit<
|
| + 0xffff,
|
| + GrUserStencilTest::kAlwaysIfInClip,
|
| + 0xffff,
|
| + GrUserStencilOp::kInvert,
|
| + GrUserStencilOp::kInvert,
|
| + 0xffff>()
|
| + );
|
| + return kEvenOddStencilPass;
|
| + }
|
| + }
|
| +}
|
| +
|
| class GlyphGenerator : public GrPathRange::PathGenerator {
|
| public:
|
| GlyphGenerator(const SkTypeface& typeface, const SkScalerContextEffects& effects,
|
|
|