OLD | NEW |
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 "SkPath.h" | 9 #include "SkPath.h" |
10 #include "SkPathRef.h" | 10 #include "SkPathRef.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); | 303 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); |
304 SkASSERT(!(NULL == fPoints && fPointCnt)); | 304 SkASSERT(!(NULL == fPoints && fPointCnt)); |
305 SkASSERT(!(NULL == fVerbs && fVerbCnt)); | 305 SkASSERT(!(NULL == fVerbs && fVerbCnt)); |
306 SkASSERT(this->currSize() == | 306 SkASSERT(this->currSize() == |
307 fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVe
rbCnt); | 307 fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVe
rbCnt); |
308 | 308 |
309 #ifdef SK_DEBUG | 309 #ifdef SK_DEBUG |
310 if (!fBoundsIsDirty && !fBounds.isEmpty()) { | 310 if (!fBoundsIsDirty && !fBounds.isEmpty()) { |
311 bool isFinite = true; | 311 bool isFinite = true; |
312 for (int i = 0; i < fPointCnt; ++i) { | 312 for (int i = 0; i < fPointCnt; ++i) { |
313 SkASSERT(fPoints[i].fX >= fBounds.fLeft && fPoints[i].fX <= fBounds.
fRight && | 313 SkASSERT(fBounds.fLeft - fPoints[i].fX < SK_ScalarNearlyZero && |
314 fPoints[i].fY >= fBounds.fTop && fPoints[i].fY <= fBound
s.fBottom); | 314 fPoints[i].fX - fBounds.fRight < SK_ScalarNearlyZero && |
| 315 fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero && |
| 316 fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero); |
315 if (!fPoints[i].isFinite()) { | 317 if (!fPoints[i].isFinite()) { |
316 isFinite = false; | 318 isFinite = false; |
317 } | 319 } |
318 } | 320 } |
319 SkASSERT(SkToBool(fIsFinite) == isFinite); | 321 SkASSERT(SkToBool(fIsFinite) == isFinite); |
320 } | 322 } |
321 #endif | 323 #endif |
322 } | 324 } |
323 #endif | 325 #endif |
OLD | NEW |