aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPathRef.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-01-05 09:20:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-05 09:20:04 -0800
commitf1cdead599715dbae30278bffa4528bd1664f61f (patch)
tree155568e42a8b27b6820c58b0216304840a888c00 /src/core/SkPathRef.cpp
parent50b9307e96064637b10b6f070a807e320c45a005 (diff)
Print out failing PathRef test on ChromeOS
This is intended to provide additional information for a flaky assertion failure on ChromeOS Daisy. BUG=skia:3282 Review URL: https://codereview.chromium.org/821683002
Diffstat (limited to 'src/core/SkPathRef.cpp')
-rw-r--r--src/core/SkPathRef.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index e7b70b9285..44838f9246 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -452,6 +452,21 @@ void SkPathRef::validate() const {
if (!fBoundsIsDirty && !fBounds.isEmpty()) {
bool isFinite = true;
for (int i = 0; i < fPointCnt; ++i) {
+#ifdef SK_DEBUG
+ if (fPoints[i].isFinite() &&
+ (fPoints[i].fX < fBounds.fLeft || fPoints[i].fX > fBounds.fRight ||
+ fPoints[i].fY < fBounds.fTop || fPoints[i].fY > fBounds.fBottom)) {
+ SkDebugf("bounds: %f %f %f %f\n",
+ fBounds.fLeft, fBounds.fTop, fBounds.fRight, fBounds.fBottom);
+ for (int j = 0; j < fPointCnt; ++j) {
+ if (i == j) {
+ SkDebugf("*");
+ }
+ SkDebugf("%f %f\n", fPoints[j].fX, fPoints[j].fY);
+ }
+ }
+#endif
+
SkASSERT(!fPoints[i].isFinite() ||
(fPoints[i].fX >= fBounds.fLeft && fPoints[i].fX <= fBounds.fRight &&
fPoints[i].fY >= fBounds.fTop && fPoints[i].fY <= fBounds.fBottom));