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

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

Issue 26372006: Replace cubic round rect corners with quads (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up Created 7 years, 2 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 | Annotate | Revision Log
« src/core/SkPath.cpp ('K') | « src/core/SkPath.cpp ('k') | 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 "SkPath.h" 9 #include "SkPath.h"
10 #include "SkPathRef.h" 10 #include "SkPathRef.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace)); 302 SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
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) {
robertphillips 2013/10/16 14:49:57 This was firing due to floating point errors.
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
OLDNEW
« src/core/SkPath.cpp ('K') | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698