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

Side by Side Diff: tests/PathOpsDebug.cpp

Issue 1096923003: working on initial winding for cubics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « tests/PathOpsDCubicTest.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "PathOpsTSectDebug.h" 8 #include "PathOpsTSectDebug.h"
9 #include "SkOpCoincidence.h" 9 #include "SkOpCoincidence.h"
10 #include "SkOpContour.h" 10 #include "SkOpContour.h"
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 1205
1206 void SkOpContour::dumpSpans() const { 1206 void SkOpContour::dumpSpans() const {
1207 SkDebugf("contour=%d\n", this->debugID()); 1207 SkDebugf("contour=%d\n", this->debugID());
1208 const SkOpSegment* segment = &fHead; 1208 const SkOpSegment* segment = &fHead;
1209 do { 1209 do {
1210 SkDebugf(" seg=%d ", segment->debugID()); 1210 SkDebugf(" seg=%d ", segment->debugID());
1211 segment->dump(); 1211 segment->dump();
1212 } while ((segment = segment->next())); 1212 } while ((segment = segment->next()));
1213 } 1213 }
1214 1214
1215 void SkOpCurve::dump() const {
1216 int count = SkPathOpsVerbToPoints(SkDEBUGRELEASE(fVerb, SkPath::kCubic_Verb) );
1217 SkDebugf("{{");
1218 int index;
1219 for (index = 0; index <= count - 1; ++index) {
1220 SkDebugf("{%1.9gf,%1.9gf}, ", fPts[index].fX, fPts[index].fY);
1221 }
1222 SkDebugf("{%1.9gf,%1.9gf}}}\n", fPts[index].fX, fPts[index].fY);
1223 }
1224
1215 #ifdef SK_DEBUG 1225 #ifdef SK_DEBUG
1216 const SkOpAngle* SkOpGlobalState::debugAngle(int id) const { 1226 const SkOpAngle* SkOpGlobalState::debugAngle(int id) const {
1217 const SkOpContour* contour = fHead; 1227 const SkOpContour* contour = fHead;
1218 do { 1228 do {
1219 const SkOpSegment* segment = contour->first(); 1229 const SkOpSegment* segment = contour->first();
1220 while (segment) { 1230 while (segment) {
1221 const SkOpSpan* span = segment->head(); 1231 const SkOpSpan* span = segment->head();
1222 do { 1232 do {
1223 SkOpAngle* angle = span->fromAngle(); 1233 SkOpAngle* angle = span->fromAngle();
1224 if (angle && angle->debugID() == id) { 1234 if (angle && angle->debugID() == id) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 SkPathOpsDebug::DumpContoursPt(contours, segmentID); 1367 SkPathOpsDebug::DumpContoursPt(contours, segmentID);
1358 } 1368 }
1359 1369
1360 void DumpPts(const SkTDArray<SkOpContour* >* contours) { 1370 void DumpPts(const SkTDArray<SkOpContour* >* contours) {
1361 SkPathOpsDebug::DumpContoursPts(contours); 1371 SkPathOpsDebug::DumpContoursPts(contours);
1362 } 1372 }
1363 1373
1364 #if DEBUG_T_SECT_DUMP > 1 1374 #if DEBUG_T_SECT_DUMP > 1
1365 int gDumpTSectNum; 1375 int gDumpTSectNum;
1366 #endif 1376 #endif
OLDNEW
« no previous file with comments | « tests/PathOpsDCubicTest.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698