diff options
author | Cary Clark <caryclark@google.com> | 2016-10-04 10:01:04 -0400 |
---|---|---|
committer | Cary Clark <caryclark@google.com> | 2016-10-04 14:26:00 +0000 |
commit | ab87d7abf1df007c90bef2e916294ca325d81c81 (patch) | |
tree | c28fc9383e6886e5f8411ad3b50e90644d698f30 /tests/PathOpsDebug.cpp | |
parent | 1818701746e4ea76631afd6934d6257e2b3d781b (diff) |
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 <caryclark@google.com>
Diffstat (limited to 'tests/PathOpsDebug.cpp')
-rwxr-xr-x | tests/PathOpsDebug.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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 { |