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

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

Issue 568823002: Add more debugging for newly failing assert (DM on Xoom bots). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkGeometry.h" 8 #include "SkGeometry.h"
9 #include "SkMatrix.h" 9 #include "SkMatrix.h"
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 if (denom == 0 || numer == 0 || numer >= denom) { 97 if (denom == 0 || numer == 0 || numer >= denom) {
98 return 0; 98 return 0;
99 } 99 }
100 100
101 SkScalar r = SkScalarDiv(numer, denom); 101 SkScalar r = SkScalarDiv(numer, denom);
102 if (SkScalarIsNaN(r)) { 102 if (SkScalarIsNaN(r)) {
103 return 0; 103 return 0;
104 } 104 }
105 SkASSERT(r >= 0 && r < SK_Scalar1); 105 SkASSERTF(r >= 0 && r < SK_Scalar1, "numer %f, denom %f, r %f", numer, denom , r);
tfarina 2014/09/12 17:16:23 lgtm (rubber-stamp).
106 if (r == 0) { // catch underflow if numer <<<< denom 106 if (r == 0) { // catch underflow if numer <<<< denom
107 return 0; 107 return 0;
108 } 108 }
109 *ratio = r; 109 *ratio = r;
110 return 1; 110 return 1;
111 } 111 }
112 112
113 /** From Numerical Recipes in C. 113 /** From Numerical Recipes in C.
114 114
115 Q = -1/2 (B + sign(B) sqrt[B*B - 4*A*C]) 115 Q = -1/2 (B + sign(B) sqrt[B*B - 4*A*C])
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 } 1459 }
1460 1460
1461 void SkConic::computeFastBounds(SkRect* bounds) const { 1461 void SkConic::computeFastBounds(SkRect* bounds) const {
1462 bounds->set(fPts, 3); 1462 bounds->set(fPts, 3);
1463 } 1463 }
1464 1464
1465 bool SkConic::findMaxCurvature(SkScalar* t) const { 1465 bool SkConic::findMaxCurvature(SkScalar* t) const {
1466 // TODO: Implement me 1466 // TODO: Implement me
1467 return false; 1467 return false;
1468 } 1468 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698