Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: src/gpu/GrPathRendering.cpp

Issue 1966763002: Eliminate special case nvpr batch handling (Closed) Base URL: https://skia.googlesource.com/skia.git@reallyupload_userstencil
Patch Set: fixes Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPathRendering.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRendering.cpp
diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp
index d1345c9b064df6e9e6e552315d1039951d5dc933..652f2ce1957ba02646905d7829264e57a0d27ef1 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,
« no previous file with comments | « src/gpu/GrPathRendering.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698