Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: src/core/SkPathRef.cpp

Issue 821683002: Print out failing PathRef test on ChromeOS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bug Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index e7b70b9285bd9533f07d9a59f93874353d236cba..44838f924637ff144a83aa86ac3aaf90f89d76fa 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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698