aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsTSectDebug.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-10-20 13:42:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-20 13:42:25 -0700
commitef33b1e739b23a1201100ff17a572da85b03d9af (patch)
treeaed5e149a4e3b6594fb0c3f556ecd06eebdedd4f /tests/PathOpsTSectDebug.h
parent45a1c34f607a970933e5cd05e1df6cd8090db1be (diff)
The remaining 1m skp bugs are asserts that can be harmlessly
suppressed and bugs around conics. The conic calculation for a subdivided w was just wrong. Also added debugging to template intersection to initialize reused structures and dump additional data. TBR=reed@google.com Review URL: https://codereview.chromium.org/1413763002
Diffstat (limited to 'tests/PathOpsTSectDebug.h')
-rw-r--r--tests/PathOpsTSectDebug.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/PathOpsTSectDebug.h b/tests/PathOpsTSectDebug.h
index 9db904d06b..68ef4b7db1 100644
--- a/tests/PathOpsTSectDebug.h
+++ b/tests/PathOpsTSectDebug.h
@@ -8,6 +8,14 @@
#include "SkPathOpsTSect.h"
template<typename TCurve, typename OppCurve>
+char SkTCoincident<TCurve, OppCurve>::dumpIsCoincidentStr() const {
+ if (!!fCoincident != fCoincident) {
+ return '?';
+ }
+ return fCoincident ? '*' : 0;
+}
+
+template<typename TCurve, typename OppCurve>
void SkTCoincident<TCurve, OppCurve>::dump() const {
SkDebugf("t=%1.9g pt=(%1.9g,%1.9g)%s\n", fPerpT, fPerpPt.fX, fPerpPt.fY,
fCoincident ? " coincident" : "");
@@ -201,11 +209,13 @@ void SkTSpan<TCurve, OppCurve>::dumpCoin() const {
template<typename TCurve, typename OppCurve>
void SkTSpan<TCurve, OppCurve>::dumpID() const {
- if (fCoinStart.isCoincident()) {
- SkDebugf("%c", '*');
+ char cS = fCoinStart.dumpIsCoincidentStr();
+ if (cS) {
+ SkDebugf("%c", cS);
}
SkDebugf("%d", debugID());
- if (fCoinEnd.isCoincident()) {
- SkDebugf("%c", '*');
+ char cE = fCoinEnd.dumpIsCoincidentStr();
+ if (cE) {
+ SkDebugf("%c", cE);
}
}