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

Side by Side Diff: src/core/SkPathRef.cpp

Issue 65493004: increase coverage of SkPath.cpp, remove unused code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: increase coverage above 95%; add missing conic case Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkPath.cpp ('k') | tests/PathTest.cpp » ('j') | 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 "SkOnce.h" 9 #include "SkOnce.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 SkASSERT(static_cast<ptrdiff_t>(fFreeSpace) >= 0); 325 SkASSERT(static_cast<ptrdiff_t>(fFreeSpace) >= 0);
326 SkASSERT(reinterpret_cast<intptr_t>(fVerbs) - reinterpret_cast<intptr_t>(fPo ints) >= 0); 326 SkASSERT(reinterpret_cast<intptr_t>(fVerbs) - reinterpret_cast<intptr_t>(fPo ints) >= 0);
327 SkASSERT((NULL == fPoints) == (NULL == fVerbs)); 327 SkASSERT((NULL == fPoints) == (NULL == fVerbs));
328 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); 328 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
329 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); 329 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
330 SkASSERT(!(NULL == fPoints && fPointCnt)); 330 SkASSERT(!(NULL == fPoints && fPointCnt));
331 SkASSERT(!(NULL == fVerbs && fVerbCnt)); 331 SkASSERT(!(NULL == fVerbs && fVerbCnt));
332 SkASSERT(this->currSize() == 332 SkASSERT(this->currSize() ==
333 fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVe rbCnt); 333 fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVe rbCnt);
334 334
335 #ifdef SK_DEBUG
336 if (!fBoundsIsDirty && !fBounds.isEmpty()) { 335 if (!fBoundsIsDirty && !fBounds.isEmpty()) {
337 bool isFinite = true; 336 bool isFinite = true;
338 for (int i = 0; i < fPointCnt; ++i) { 337 for (int i = 0; i < fPointCnt; ++i) {
339 SkASSERT(fBounds.fLeft - fPoints[i].fX < SK_ScalarNearlyZero && 338 SkASSERT(!fPoints[i].isFinite() || (
339 fBounds.fLeft - fPoints[i].fX < SK_ScalarNearlyZero &&
340 fPoints[i].fX - fBounds.fRight < SK_ScalarNearlyZero && 340 fPoints[i].fX - fBounds.fRight < SK_ScalarNearlyZero &&
341 fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero && 341 fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero &&
342 fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero); 342 fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero));
343 if (!fPoints[i].isFinite()) { 343 if (!fPoints[i].isFinite()) {
344 isFinite = false; 344 isFinite = false;
345 } 345 }
346 } 346 }
347 SkASSERT(SkToBool(fIsFinite) == isFinite); 347 SkASSERT(SkToBool(fIsFinite) == isFinite);
348 } 348 }
349 #endif
350 } 349 }
351 #endif 350 #endif
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698