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

Side by Side Diff: experimental/Intersection/CubicUtilities.h

Issue 481513004: Define NDEBUG instead of SK_DEBUG/SK_RELEASE. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 #if !defined CUBIC_UTILITIES_H 7 #if !defined CUBIC_UTILITIES_H
8 #define CUBIC_UTILITIES_H 8 #define CUBIC_UTILITIES_H
9 9
10 #include "DataTypes.h" 10 #include "DataTypes.h"
11 #include "SkTDArray.h" 11 #include "SkTDArray.h"
12 12
13 double calcPrecision(const Cubic& cubic); 13 double calcPrecision(const Cubic& cubic);
14 #if SK_DEBUG 14 #ifdef SK_DEBUG
15 double calcPrecision(const Cubic& cubic, double t, double scale); 15 double calcPrecision(const Cubic& cubic, double t, double scale);
16 #endif 16 #endif
17 void chop_at(const Cubic& src, CubicPair& dst, double t); 17 void chop_at(const Cubic& src, CubicPair& dst, double t);
18 bool clockwise(const Cubic& c); 18 bool clockwise(const Cubic& c);
19 double cube_root(double x); 19 double cube_root(double x);
20 int cubic_to_quadratics(const Cubic& cubic, double precision, 20 int cubic_to_quadratics(const Cubic& cubic, double precision,
21 SkTDArray<Quadratic>& quadratics); 21 SkTDArray<Quadratic>& quadratics);
22 void cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<double> & ts); 22 void cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<double> & ts);
23 void coefficients(const double* cubic, double& A, double& B, double& C, double& D); 23 void coefficients(const double* cubic, double& A, double& B, double& C, double& D);
24 bool controls_contained_by_ends(const Cubic& c); 24 bool controls_contained_by_ends(const Cubic& c);
(...skipping 12 matching lines...) Expand all
37 bool serpentine(const Cubic& c); 37 bool serpentine(const Cubic& c);
38 void sub_divide(const Cubic& src, double t1, double t2, Cubic& dst); 38 void sub_divide(const Cubic& src, double t1, double t2, Cubic& dst);
39 void sub_divide(const Cubic& , const _Point& a, const _Point& d, double t1, doub le t2, _Point [2]); 39 void sub_divide(const Cubic& , const _Point& a, const _Point& d, double t1, doub le t2, _Point [2]);
40 _Point top(const Cubic& , double startT, double endT); 40 _Point top(const Cubic& , double startT, double endT);
41 void xy_at_t(const Cubic& , double t, double& x, double& y); 41 void xy_at_t(const Cubic& , double t, double& x, double& y);
42 _Point xy_at_t(const Cubic& , double t); 42 _Point xy_at_t(const Cubic& , double t);
43 43
44 extern const int gPrecisionUnit; 44 extern const int gPrecisionUnit;
45 45
46 #endif 46 #endif
OLDNEW
« no previous file with comments | « experimental/Intersection/CubicIntersection_Test.cpp ('k') | experimental/Intersection/CubicUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698