As part of preliminary groundwork for a chromium fix, this changelist is deprecating GrPathFill so that SkPath::FillType is used everywhere in order to remove some code duplication between Skia and Ganesh.
BUG=chromium:135111
TEST=Try path rendering tests from the gm
Review URL: https://codereview.appspot.com/6875058
git-svn-id: http://skia.googlecode.com/svn/trunk@6693 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 8fa39d2..6927895 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -15,6 +15,8 @@
#include "GrTexture.h"
#include "GrVertexBuffer.h"
+#include "SkStroke.h"
+
SK_DEFINE_INST_COUNT(GrDrawTarget)
namespace {
@@ -783,13 +785,13 @@
}
}
-void GrDrawTarget::stencilPath(const GrPath* path, GrPathFill fill) {
+void GrDrawTarget::stencilPath(const GrPath* path, const SkStroke& stroke, SkPath::FillType fill) {
// TODO: extract portions of checkDraw that are relevant to path stenciling.
GrAssert(NULL != path);
GrAssert(fCaps.pathStencilingSupport());
- GrAssert(kHairLine_GrPathFill != fill);
- GrAssert(!GrIsFillInverted(fill));
- this->onStencilPath(path, fill);
+ GrAssert(0 != stroke.getWidthIfStroked());
+ GrAssert(!SkPath::IsInverseFill(fill));
+ this->onStencilPath(path, stroke, fill);
}
////////////////////////////////////////////////////////////////////////////////