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

Unified 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 side-by-side diff with in-line comments
Download patch
« src/core/SkPath.cpp ('K') | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
===================================================================
--- src/core/SkPathRef.cpp (revision 11792)
+++ src/core/SkPathRef.cpp (working copy)
@@ -310,8 +310,10 @@
if (!fBoundsIsDirty && !fBounds.isEmpty()) {
bool isFinite = true;
for (int i = 0; i < fPointCnt; ++i) {
robertphillips 2013/10/16 14:49:57 This was firing due to floating point errors.
- SkASSERT(fPoints[i].fX >= fBounds.fLeft && fPoints[i].fX <= fBounds.fRight &&
- fPoints[i].fY >= fBounds.fTop && fPoints[i].fY <= fBounds.fBottom);
+ SkASSERT(fBounds.fLeft - fPoints[i].fX < SK_ScalarNearlyZero &&
+ fPoints[i].fX - fBounds.fRight < SK_ScalarNearlyZero &&
+ fBounds.fTop - fPoints[i].fY < SK_ScalarNearlyZero &&
+ fPoints[i].fY - fBounds.fBottom < SK_ScalarNearlyZero);
if (!fPoints[i].isFinite()) {
isFinite = false;
}
« 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