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

Side by Side Diff: tests/PathOpsDebug.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/PathOpsBuilderTest.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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 span->dumpAll(); 1059 span->dumpAll();
1060 } while (!span->final() && (span = span->upCast()->next())); 1060 } while (!span->final() && (span = span->upCast()->next()));
1061 contour()->outdentDump(); 1061 contour()->outdentDump();
1062 } 1062 }
1063 1063
1064 void SkOpSegment::dumpAngles() const { 1064 void SkOpSegment::dumpAngles() const {
1065 SkDebugf("seg=%d\n", debugID()); 1065 SkDebugf("seg=%d\n", debugID());
1066 const SkOpSpanBase* span = &fHead; 1066 const SkOpSpanBase* span = &fHead;
1067 do { 1067 do {
1068 const SkOpAngle* fAngle = span->fromAngle(); 1068 const SkOpAngle* fAngle = span->fromAngle();
1069 const SkOpAngle* tAngle = span->final() ? NULL : span->upCast()->toAngle (); 1069 const SkOpAngle* tAngle = span->final() ? nullptr : span->upCast()->toAn gle();
1070 if (fAngle) { 1070 if (fAngle) {
1071 SkDebugf(" span=%d from=%d ", span->debugID(), fAngle->debugID()); 1071 SkDebugf(" span=%d from=%d ", span->debugID(), fAngle->debugID());
1072 fAngle->dumpTo(this, tAngle); 1072 fAngle->dumpTo(this, tAngle);
1073 } 1073 }
1074 if (tAngle) { 1074 if (tAngle) {
1075 SkDebugf(" span=%d to=%d ", span->debugID(), tAngle->debugID()); 1075 SkDebugf(" span=%d to=%d ", span->debugID(), tAngle->debugID());
1076 tAngle->dumpTo(this, fAngle); 1076 tAngle->dumpTo(this, fAngle);
1077 } 1077 }
1078 } while (!span->final() && (span = span->upCast()->next())); 1078 } while (!span->final() && (span = span->upCast()->next()));
1079 } 1079 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 } 1278 }
1279 } while ((span = span->next()->upCastable())); 1279 } while ((span = span->next()->upCastable()));
1280 const SkOpSpanBase* tail = segment->tail(); 1280 const SkOpSpanBase* tail = segment->tail();
1281 SkOpAngle* angle = tail->fromAngle(); 1281 SkOpAngle* angle = tail->fromAngle();
1282 if (angle && angle->debugID() == id) { 1282 if (angle && angle->debugID() == id) {
1283 return angle; 1283 return angle;
1284 } 1284 }
1285 segment = segment->next(); 1285 segment = segment->next();
1286 } 1286 }
1287 } while ((contour = contour->next())); 1287 } while ((contour = contour->next()));
1288 return NULL; 1288 return nullptr;
1289 } 1289 }
1290 1290
1291 SkOpContour* SkOpGlobalState::debugContour(int id) { 1291 SkOpContour* SkOpGlobalState::debugContour(int id) {
1292 SkOpContour* contour = fContourHead; 1292 SkOpContour* contour = fContourHead;
1293 do { 1293 do {
1294 if (contour->debugID() == id) { 1294 if (contour->debugID() == id) {
1295 return contour; 1295 return contour;
1296 } 1296 }
1297 } while ((contour = contour->next())); 1297 } while ((contour = contour->next()));
1298 return NULL; 1298 return nullptr;
1299 } 1299 }
1300 1300
1301 const SkOpPtT* SkOpGlobalState::debugPtT(int id) const { 1301 const SkOpPtT* SkOpGlobalState::debugPtT(int id) const {
1302 const SkOpContour* contour = fContourHead; 1302 const SkOpContour* contour = fContourHead;
1303 do { 1303 do {
1304 const SkOpSegment* segment = contour->first(); 1304 const SkOpSegment* segment = contour->first();
1305 while (segment) { 1305 while (segment) {
1306 const SkOpSpan* span = segment->head(); 1306 const SkOpSpan* span = segment->head();
1307 do { 1307 do {
1308 const SkOpPtT* ptT = span->ptT(); 1308 const SkOpPtT* ptT = span->ptT();
1309 if (ptT->debugMatchID(id)) { 1309 if (ptT->debugMatchID(id)) {
1310 return ptT; 1310 return ptT;
1311 } 1311 }
1312 } while ((span = span->next()->upCastable())); 1312 } while ((span = span->next()->upCastable()));
1313 const SkOpSpanBase* tail = segment->tail(); 1313 const SkOpSpanBase* tail = segment->tail();
1314 const SkOpPtT* ptT = tail->ptT(); 1314 const SkOpPtT* ptT = tail->ptT();
1315 if (ptT->debugMatchID(id)) { 1315 if (ptT->debugMatchID(id)) {
1316 return ptT; 1316 return ptT;
1317 } 1317 }
1318 segment = segment->next(); 1318 segment = segment->next();
1319 } 1319 }
1320 } while ((contour = contour->next())); 1320 } while ((contour = contour->next()));
1321 return NULL; 1321 return nullptr;
1322 } 1322 }
1323 1323
1324 const SkOpSegment* SkOpGlobalState::debugSegment(int id) const { 1324 const SkOpSegment* SkOpGlobalState::debugSegment(int id) const {
1325 const SkOpContour* contour = fContourHead; 1325 const SkOpContour* contour = fContourHead;
1326 do { 1326 do {
1327 const SkOpSegment* segment = contour->first(); 1327 const SkOpSegment* segment = contour->first();
1328 while (segment) { 1328 while (segment) {
1329 if (segment->debugID() == id) { 1329 if (segment->debugID() == id) {
1330 return segment; 1330 return segment;
1331 } 1331 }
1332 segment = segment->next(); 1332 segment = segment->next();
1333 } 1333 }
1334 } while ((contour = contour->next())); 1334 } while ((contour = contour->next()));
1335 return NULL; 1335 return nullptr;
1336 } 1336 }
1337 1337
1338 const SkOpSpanBase* SkOpGlobalState::debugSpan(int id) const { 1338 const SkOpSpanBase* SkOpGlobalState::debugSpan(int id) const {
1339 const SkOpContour* contour = fContourHead; 1339 const SkOpContour* contour = fContourHead;
1340 do { 1340 do {
1341 const SkOpSegment* segment = contour->first(); 1341 const SkOpSegment* segment = contour->first();
1342 while (segment) { 1342 while (segment) {
1343 const SkOpSpan* span = segment->head(); 1343 const SkOpSpan* span = segment->head();
1344 do { 1344 do {
1345 if (span->debugID() == id) { 1345 if (span->debugID() == id) {
1346 return span; 1346 return span;
1347 } 1347 }
1348 } while ((span = span->next()->upCastable())); 1348 } while ((span = span->next()->upCastable()));
1349 const SkOpSpanBase* tail = segment->tail(); 1349 const SkOpSpanBase* tail = segment->tail();
1350 if (tail->debugID() == id) { 1350 if (tail->debugID() == id) {
1351 return tail; 1351 return tail;
1352 } 1352 }
1353 segment = segment->next(); 1353 segment = segment->next();
1354 } 1354 }
1355 } while ((contour = contour->next())); 1355 } while ((contour = contour->next()));
1356 return NULL; 1356 return nullptr;
1357 } 1357 }
1358 #endif 1358 #endif
1359 1359
1360 #if DEBUG_T_SECT_DUMP > 1 1360 #if DEBUG_T_SECT_DUMP > 1
1361 int gDumpTSectNum; 1361 int gDumpTSectNum;
1362 #endif 1362 #endif
OLDNEW
« no previous file with comments | « tests/PathOpsBuilderTest.cpp ('k') | tests/PathOpsExtendedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698