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

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: base files missing retry 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
« no previous file with comments | « 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698