99#include " include/core/SkString.h"
1010#include " include/private/SkMutex.h"
1111#include " src/core/SkOSFile.h"
12+ #include " src/core/SkPathPriv.h"
1213#include " src/pathops/SkOpCoincidence.h"
1314#include " src/pathops/SkOpContour.h"
1415#include " src/pathops/SkPathOpsDebug.h"
@@ -2838,37 +2839,35 @@ static void output_points(const SkPoint* pts, int count) {
28382839 }
28392840}
28402841
2841- static void showPathContours (SkPath::RawIter& iter, const char * pathName) {
2842- uint8_t verb;
2843- SkPoint pts[4 ];
2844- while ((verb = iter.next (pts)) != SkPath::kDone_Verb ) {
2842+ static void showPathContours (const SkPath& path, const char * pathName) {
2843+ for (auto [verb, pts, w] : SkPathPriv::Iterate (path)) {
28452844 switch (verb) {
2846- case SkPath:: kMove_Verb :
2845+ case SkPathVerb:: kMove :
28472846 SkDebugf (" %s.moveTo(" , pathName);
28482847 output_points (&pts[0 ], 1 );
28492848 SkDebugf (" );\n " );
28502849 continue ;
2851- case SkPath:: kLine_Verb :
2850+ case SkPathVerb:: kLine :
28522851 SkDebugf (" %s.lineTo(" , pathName);
28532852 output_points (&pts[1 ], 1 );
28542853 SkDebugf (" );\n " );
28552854 break ;
2856- case SkPath:: kQuad_Verb :
2855+ case SkPathVerb:: kQuad :
28572856 SkDebugf (" %s.quadTo(" , pathName);
28582857 output_points (&pts[1 ], 2 );
28592858 SkDebugf (" );\n " );
28602859 break ;
2861- case SkPath:: kConic_Verb :
2860+ case SkPathVerb:: kConic :
28622861 SkDebugf (" %s.conicTo(" , pathName);
28632862 output_points (&pts[1 ], 2 );
2864- SkDebugf (" , %1.9gf);\n " , iter. conicWeight () );
2863+ SkDebugf (" , %1.9gf);\n " , *w );
28652864 break ;
2866- case SkPath:: kCubic_Verb :
2865+ case SkPathVerb:: kCubic :
28672866 SkDebugf (" %s.cubicTo(" , pathName);
28682867 output_points (&pts[1 ], 3 );
28692868 SkDebugf (" );\n " );
28702869 break ;
2871- case SkPath:: kClose_Verb :
2870+ case SkPathVerb:: kClose :
28722871 SkDebugf (" %s.close();\n " , pathName);
28732872 break ;
28742873 default :
@@ -2886,7 +2885,6 @@ static const char* gFillTypeStr[] = {
28862885};
28872886
28882887void SkPathOpsDebug::ShowOnePath (const SkPath& path, const char * name, bool includeDeclaration) {
2889- SkPath::RawIter iter (path);
28902888#define SUPPORT_RECT_CONTOUR_DETECTION 0
28912889#if SUPPORT_RECT_CONTOUR_DETECTION
28922890 int rectCount = path.isRectContours () ? path.rectContours (nullptr , nullptr ) : 0 ;
@@ -2911,8 +2909,7 @@ void SkPathOpsDebug::ShowOnePath(const SkPath& path, const char* name, bool incl
29112909 SkDebugf (" SkPath %s;\n " , name);
29122910 }
29132911 SkDebugf (" %s.setFillType(SkPath::%s);\n " , name, gFillTypeStr [(int )fillType]);
2914- iter.setPath (path);
2915- showPathContours (iter, name);
2912+ showPathContours (path, name);
29162913}
29172914
29182915#if DEBUG_DUMP_VERIFY
0 commit comments