@@ -137,9 +137,10 @@ void GrCCFiller::PathInfo::tessellateFan(
137137 // count to the appropriate fill type later.
138138 fan.setFillType (SkPath::kWinding_FillType );
139139 } else {
140- // When counting winding numbers in the stencil buffer, it works to just tessellate the
141- // Redbook fan with the same fill type as the path.
142- fan.setFillType (originalPath.getFillType ());
140+ // When counting winding numbers in the stencil buffer, it works to use even/odd for the fan
141+ // tessellation (where applicable). But we need to strip out inverse fill info because
142+ // inverse-ness gets accounted for later on.
143+ fan.setFillType (SkPath::ConvertToNonInverseFillType (originalPath.getFillType ()));
143144 }
144145 SkASSERT (Verb::kBeginPath == verbs[verbsIdx]);
145146 for (int i = verbsIdx + 1 ; i < verbs.count (); ++i) {
@@ -175,9 +176,10 @@ void GrCCFiller::PathInfo::tessellateFan(
175176 }
176177
177178 GrTessellator::WindingVertex* vertices = nullptr ;
178- fFanTessellationCount =
179- GrTessellator::PathToVertices (fan, std::numeric_limits<float >::infinity (),
180- SkRect::Make (clippedDevIBounds), &vertices);
179+ SkASSERT (!fan.isInverseFillType ());
180+ fFanTessellationCount = GrTessellator::PathToVertices (
181+ fan, std::numeric_limits<float >::infinity (), SkRect::Make (clippedDevIBounds),
182+ &vertices);
181183 if (fFanTessellationCount <= 0 ) {
182184 SkASSERT (0 == fFanTessellationCount );
183185 SkASSERT (nullptr == vertices);
0 commit comments