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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBuffer.h" 8 #include "SkBuffer.h"
9 #include "SkLazyPtr.h" 9 #include "SkLazyPtr.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); 445 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
446 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); 446 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
447 SkASSERT(!(NULL == fPoints && fPointCnt)); 447 SkASSERT(!(NULL == fPoints && fPointCnt));
448 SkASSERT(!(NULL == fVerbs && fVerbCnt)); 448 SkASSERT(!(NULL == fVerbs && fVerbCnt));
449 SkASSERT(this->currSize() == 449 SkASSERT(this->currSize() ==
450 fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVe rbCnt); 450 fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVe rbCnt);
451 451
452 if (!fBoundsIsDirty && !fBounds.isEmpty()) { 452 if (!fBoundsIsDirty && !fBounds.isEmpty()) {
453 bool isFinite = true; 453 bool isFinite = true;
454 for (int i = 0; i < fPointCnt; ++i) { 454 for (int i = 0; i < fPointCnt; ++i) {
455 #ifdef SK_DEBUG
456 if (fPoints[i].isFinite() &&
457 (fPoints[i].fX < fBounds.fLeft || fPoints[i].fX > fBounds.fRight ||
458 fPoints[i].fY < fBounds.fTop || fPoints[i].fY > fBounds.fBottom )) {
459 SkDebugf("bounds: %f %f %f %f\n",
460 fBounds.fLeft, fBounds.fTop, fBounds.fRight, fBounds.fB ottom);
461 for (int j = 0; j < fPointCnt; ++j) {
462 if (i == j) {
463 SkDebugf("*");
464 }
465 SkDebugf("%f %f\n", fPoints[j].fX, fPoints[j].fY);
466 }
467 }
468 #endif
469
455 SkASSERT(!fPoints[i].isFinite() || 470 SkASSERT(!fPoints[i].isFinite() ||
456 (fPoints[i].fX >= fBounds.fLeft && fPoints[i].fX <= fBounds .fRight && 471 (fPoints[i].fX >= fBounds.fLeft && fPoints[i].fX <= fBounds .fRight &&
457 fPoints[i].fY >= fBounds.fTop && fPoints[i].fY <= fBounds. fBottom)); 472 fPoints[i].fY >= fBounds.fTop && fPoints[i].fY <= fBounds. fBottom));
458 if (!fPoints[i].isFinite()) { 473 if (!fPoints[i].isFinite()) {
459 isFinite = false; 474 isFinite = false;
460 } 475 }
461 } 476 }
462 SkASSERT(SkToBool(fIsFinite) == isFinite); 477 SkASSERT(SkToBool(fIsFinite) == isFinite);
463 } 478 }
464 479
(...skipping 22 matching lines...) Expand all
487 break; 502 break;
488 default: 503 default:
489 SkDEBUGFAIL("Unknown Verb"); 504 SkDEBUGFAIL("Unknown Verb");
490 break; 505 break;
491 } 506 }
492 } 507 }
493 SkASSERT(mask == fSegmentMask); 508 SkASSERT(mask == fSegmentMask);
494 #endif // SK_DEBUG_PATH 509 #endif // SK_DEBUG_PATH
495 } 510 }
496 #endif 511 #endif
OLDNEW
« 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