Index: tests/PathOpsDebug.cpp |
diff --git a/tests/PathOpsDebug.cpp b/tests/PathOpsDebug.cpp |
index 8ac38aaf6dc8998c0ca15c23bfe31b8a3e20351c..c4fbbfa69517610c7168e6fb9e6f361b2c455e78 100755 |
--- a/tests/PathOpsDebug.cpp |
+++ b/tests/PathOpsDebug.cpp |
@@ -19,6 +19,9 @@ inline void DebugDumpFloat(float x) { |
} |
} |
+inline void DebugDumpHexFloat(float x) { |
+ SkDebugf("SkBits2Float(0x%08x)", SkFloat2Bits(x)); |
+} |
#if DEBUG_SHOW_TEST_NAME |
@@ -413,6 +416,17 @@ void SkDPoint::Dump(const SkPoint& pt) { |
SkDebugf("}"); |
} |
+void SkDPoint::DumpHex(const SkPoint& pt) { |
+ SkDebugf("{"); |
+ DebugDumpHexFloat(pt.fX); |
+ SkDebugf(", "); |
+ DebugDumpHexFloat(pt.fY); |
+ SkDebugf("}"); |
+} |
+ |
+void SkDQuad::dump() const { |
+ dumpComma(""); |
+} |
void SkDQuad::dumpComma(const char* comma) const { |
SkDebugf("{{"); |
@@ -425,10 +439,6 @@ void SkDQuad::dumpComma(const char* comma) const { |
SkDebugf("}}%s\n", comma ? comma : ""); |
} |
-void SkDQuad::dump() const { |
- dumpComma(""); |
-} |
- |
void SkIntersectionHelper::dump() const { |
SkDPoint::Dump(pts()[0]); |
SkDPoint::Dump(pts()[1]); |
@@ -492,6 +502,18 @@ void SkOpSegment::dumpPts() const { |
SkDebugf("}}\n"); |
} |
+void SkOpSegment::dumpHexPts() const { |
+ int last = SkPathOpsVerbToPoints(fVerb); |
+ SkDebugf("((SkOpSegment*) 0x%p) [%d] {{", this, debugID()); |
+ int index = 0; |
+ do { |
+ SkDPoint::DumpHex(fPts[index]); |
+ SkDebugf(", "); |
+ } while (++index < last); |
+ SkDPoint::DumpHex(fPts[index]); |
+ SkDebugf("}}\n"); |
+} |
+ |
void SkOpSegment::dumpDPts() const { |
int count = SkPathOpsVerbToPoints(fVerb); |
SkDebugf("((SkOpSegment*) 0x%p) [%d] {{", this, debugID()); |