From ab87d7abf1df007c90bef2e916294ca325d81c81 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Tue, 4 Oct 2016 10:01:04 -0400 Subject: coin debugging runs all tests in extended This extends path ops concidence debugging to find unused algorithms and determine the extent of loops. This verifies that all 140M tests run without error in release and debug. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2391733002 patch from issue 2391733002 at patchset 1 (http://crrev.com/2391733002#ps1) Change-Id: I02ca29764405c5ac3e7ca3b2621fba28dbaaffc2 Reviewed-on: https://skia-review.googlesource.com/2923 Reviewed-by: Cary Clark --- tests/PathOpsDebug.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/PathOpsDebug.cpp') diff --git a/tests/PathOpsDebug.cpp b/tests/PathOpsDebug.cpp index c9635ea079..2c029546e6 100755 --- a/tests/PathOpsDebug.cpp +++ b/tests/PathOpsDebug.cpp @@ -330,6 +330,26 @@ const SkOpSpanBase* SkPathOpsDebug::DebugSpanSpan(const SkOpSpanBase* span, int return span->debugSpan(id); } +#if DEBUG_COIN +void SkPathOpsDebug::DumpCoinDict() { + gCoinSumChangedDict.dump("unused coin algorithm", false); + gCoinSumVisitedDict.dump("visited coin function", true); +} + +void SkPathOpsDebug::CoinDict::dump(const char* str, bool visitCheck) const { + int count = fDict.count(); + for (int index = 0; index < count; ++index) { + const auto& entry = fDict[index]; + if (visitCheck || entry.fGlitchType == kUninitialized_Glitch) { + SkDebugf("%s %s : line %d iteration %d", str, entry.fFunctionName, + entry.fLineNumber, entry.fIteration); + DumpGlitchType(entry.fGlitchType); + SkDebugf("\n"); + } + } +} +#endif + void SkOpContour::dumpContours() const { SkOpContour* contour = this->globalState()->contourHead(); do { -- cgit v1.2.3