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

Unified Diff: tests/PathOpsTSectDebug.h

Issue 1394503003: fix some pathops bugs found in 1M skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init to avoid warning Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsSkpTest.cpp ('k') | tests/PathOpsTestCommon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsTSectDebug.h
diff --git a/tests/PathOpsTSectDebug.h b/tests/PathOpsTSectDebug.h
index 51532f84768988ae4f9444edcca2d25cfed28629..9db904d06bef6df7c66e2f4abe69c17456acdd3b 100644
--- a/tests/PathOpsTSectDebug.h
+++ b/tests/PathOpsTSectDebug.h
@@ -83,8 +83,10 @@ void SkTSect<TCurve, OppCurve>::dumpBounded(int id) const {
do {
if (test->findOppSpan(bounded)) {
test->dump();
+ SkDebugf(" ");
}
} while ((test = test->next()));
+ SkDebugf("\n");
}
template<typename TCurve, typename OppCurve>
@@ -141,6 +143,24 @@ const SkTSpan<TCurve, OppCurve>* SkTSpan<TCurve, OppCurve>::debugT(double t) con
}
template<typename TCurve, typename OppCurve>
+void SkTSpan<TCurve, OppCurve>::dumpAll() const {
+ dumpID();
+ SkDebugf("=(%g,%g) [", fStartT, fEndT);
+ const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded;
+ while (testBounded) {
+ const SkTSpan<OppCurve, TCurve>* span = testBounded->fBounded;
+ const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext;
+ span->dumpID();
+ SkDebugf("=(%g,%g)", span->fStartT, span->fEndT);
+ if (next) {
+ SkDebugf(" ");
+ }
+ testBounded = next;
+ }
+ SkDebugf("]\n");
+}
+
+template<typename TCurve, typename OppCurve>
void SkTSpan<TCurve, OppCurve>::dump() const {
dumpID();
SkDebugf("=(%g,%g) [", fStartT, fEndT);
« no previous file with comments | « tests/PathOpsSkpTest.cpp ('k') | tests/PathOpsTestCommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698