SkCanvas* canvas = targets[j]->surface.get() ? targets[j]->surface->getCanvas() : NULL;
const char* config = targets[j]->config.name;
-#if SK_DEBUG
+#ifdef SK_DEBUG
// skia:2797 Some SKPs SkASSERT in debug mode. Skip them for now.
if (0 == strcmp("565", config) && SkStrContains(bench->getName(), ".skp")) {
SkDebugf("Skipping 565 %s. See skia:2797\n", bench->getName());
intersections2.fPt[pt1].y, xy2.x, xy2.y, tt2);
#endif
SkASSERT(xy1.approximatelyEqual(xy2));
-#if SK_DEBUG
+#ifdef SK_DEBUG
found = false;
for (pt3 = 0; pt3 < intersections3.used(); ++pt3) {
if (roughly_equal(tt1, intersections3.fT[0][pt3])) {
return (width > height ? width : height) / gPrecisionUnit;
}
-#if SK_DEBUG
+#ifdef SK_DEBUG
double calcPrecision(const Cubic& cubic, double t, double scale) {
Cubic part;
sub_divide(cubic, SkTMax(0., t - scale), SkTMin(1., t + scale), part);
}
int cubicRootsReal(double A, double B, double C, double D, double s[3]) {
-#if SK_DEBUG
+#ifdef SK_DEBUG
// create a string mathematica understands
// GDB set print repe 15 # if repeated digits is a bother
// set print elements 400 # if line doesn't fit
#include "SkTDArray.h"
double calcPrecision(const Cubic& cubic);
-#if SK_DEBUG
+#ifdef SK_DEBUG
double calcPrecision(const Cubic& cubic, double t, double scale);
#endif
void chop_at(const Cubic& src, CubicPair& dst, double t);
#endif
int32_t i;
float f;
-#if SK_DEBUG
+#ifdef SK_DEBUG
struct
{ // Bitfields for exploration. Do not use in production code.
uint32_t mantissa : 23;
}
#endif
-#if SK_DEBUG
+#ifdef SK_DEBUG
void mathematica_ize(char* str, size_t bufferLen) {
size_t len = strlen(str);
bool num = false;
#define sk_double_isnan(a) sk_float_isnan(a)
// FIXME: move these to debugging file
-#if SK_DEBUG
+#ifdef SK_DEBUG
void mathematica_ize(char* str, size_t bufferSize);
bool valid_wind(int winding);
void winding_printf(int winding);
public:
Intersections()
: fFlip(0)
-#if SK_DEBUG
+#ifdef SK_DEBUG
, fDepth(0)
#endif
, fSwap(0)
{
-#if SK_DEBUG
+#ifdef SK_DEBUG
bzero(fPt, sizeof(fPt));
bzero(fT, sizeof(fT));
bzero(fIsCoincident, sizeof(fIsCoincident));
if (fIsCoincident[0] & (1 << index)) {
++count;
}
- #if SK_DEBUG
+ #ifdef SK_DEBUG
if (fIsCoincident[1] & (1 << index)) {
++count2;
}
SkASSERT(++fDepth < 16);
}
-#if SK_DEBUG
+#ifdef SK_DEBUG
int depth() const {
return fDepth;
}
unsigned char fUsed;
bool fFlip;
bool fUnsortable;
-#if SK_DEBUG
+#ifdef SK_DEBUG
int fDepth;
#endif
protected:
#include "QuadraticUtilities.h"
#include "TSearch.h"
-#if SK_DEBUG
+#ifdef SK_DEBUG
#include "LineUtilities.h"
#endif
int roots = intersect(q2, *testLines[index], rootTs);
for (int idx2 = 0; idx2 < roots; ++idx2) {
double t = rootTs.fT[0][idx2];
-#if SK_DEBUG
+#ifdef SK_DEBUG
_Point qPt, lPt;
xy_at_t(q2, t, qPt.x, qPt.y);
xy_at_t(*testLines[index], rootTs.fT[1][idx2], lPt.x, lPt.y);
static void relaxedIsLinear(const Quadratic& q1, const Quadratic& q2, Intersections& i) {
double m1 = flatMeasure(q1);
double m2 = flatMeasure(q2);
-#if SK_DEBUG
+#ifdef SK_DEBUG
double min = SkTMin(m1, m2);
if (min > 5) {
SkDebugf("%s maybe not flat enough.. %1.9g\n", __FUNCTION__, min);
int reducedQuarticRoots(const double t4, const double t3, const double t2, const double t1,
const double t0, const bool oneHint, double roots[4]) {
-#if SK_DEBUG
+#ifdef SK_DEBUG
// create a string mathematica understands
// GDB set print repe 15 # if repeated digits is a bother
// set print elements 400 # if line doesn't fit
# one makefile and allow someone to add SK_DEBUG etc for their own
# debugging purposes.
'configurations': {
- 'Debug': {
- 'defines': [
- 'SK_DEBUG',
- 'SK_DEVELOPER=1',
- ],
- },
- 'Release': {
- 'defines': [
- 'SK_RELEASE',
- ],
- },
+ 'Debug': { 'defines': [ 'SK_DEVELOPER=1' ] },
+ 'Release': { 'defines': [ 'NDEBUG' ] },
'Release_Developer': {
'inherit_from': ['Release'],
- 'defines': [
- 'SK_DEVELOPER=1',
- ],
+ 'defines': [ 'SK_DEVELOPER=1' ],
},
},
}],