Stop closing filled paths in GrShape
This can force a copy of the path data and isn't really being taken advantage of. It complicates a forthcoming change to key small paths based on their data rather than gen id.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355833002
Committed: https://skia.googlesource.com/skia/+/ad001fdc77b2dfe32c1723cb58636728dfb776d8
Review-Url: https://codereview.chromium.org/2355833002
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp
index 65c9825..582858e 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -361,10 +361,6 @@
} else {
fPathData.fGenID = this->path().getGenerationID();
}
- if (this->style().isSimpleFill()) {
- this->path().close();
- this->path().setIsVolatile(true);
- }
if (!this->style().hasNonDashPathEffect()) {
if (this->style().strokeRec().getStyle() == SkStrokeRec::kStroke_Style ||
this->style().strokeRec().getStyle() == SkStrokeRec::kHairline_Style) {
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index 19dd366..d013235 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -262,7 +262,7 @@
bool first = true;
- SkPath::Iter iter(path, false);
+ SkPath::Iter iter(path, true);
SkPath::Verb verb;
SkPoint pts[4];
@@ -474,7 +474,7 @@
SkPoint pts[4];
bool first = true;
- SkPath::Iter iter(path, false);
+ SkPath::Iter iter(path, true);
bool done = false;
while (!done) {