Fix SkDEBUGCODE to accept commas
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231663002 Review-Url: https://codereview.chromium.org/2231663002
This commit is contained in:
parent
ce81ed58e2
commit
ceeaa78713
@ -154,7 +154,7 @@ inline void operator delete(void* p) {
|
||||
})
|
||||
#define SkDEBUGFAIL(message) SK_ABORT(message)
|
||||
#define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__)
|
||||
#define SkDEBUGCODE(code) code
|
||||
#define SkDEBUGCODE(...) __VA_ARGS__
|
||||
#define SkDECLAREPARAM(type, var) , type var
|
||||
#define SkPARAM(var) , var
|
||||
#define SkDEBUGF(args ) SkDebugf args
|
||||
@ -163,7 +163,7 @@ inline void operator delete(void* p) {
|
||||
#define SkASSERT(cond)
|
||||
#define SkASSERTF(cond, fmt, ...)
|
||||
#define SkDEBUGFAIL(message)
|
||||
#define SkDEBUGCODE(code)
|
||||
#define SkDEBUGCODE(...)
|
||||
#define SkDEBUGF(args)
|
||||
#define SkDECLAREPARAM(type, var)
|
||||
#define SkPARAM(var)
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
for (int index = 0; index < count; ++index) {
|
||||
double conicT = roots[index];
|
||||
SkDPoint pt = fConic.ptAtT(conicT);
|
||||
SkDEBUGCODE_(double conicVals[] = { fConic[0].fY, fConic[1].fY, fConic[2].fY });
|
||||
SkDEBUGCODE(double conicVals[] = { fConic[0].fY, fConic[1].fY, fConic[2].fY });
|
||||
SkOPOBJASSERT(fIntersections, close_to(pt.fY, axisIntercept, conicVals));
|
||||
double lineT = (pt.fX - left) / (right - left);
|
||||
if (this->pinTs(&conicT, &lineT, &pt, kPointInitialized)
|
||||
@ -157,7 +157,7 @@ public:
|
||||
for (int index = 0; index < count; ++index) {
|
||||
double conicT = roots[index];
|
||||
SkDPoint pt = fConic.ptAtT(conicT);
|
||||
SkDEBUGCODE_(double conicVals[] = { fConic[0].fX, fConic[1].fX, fConic[2].fX });
|
||||
SkDEBUGCODE(double conicVals[] = { fConic[0].fX, fConic[1].fX, fConic[2].fX });
|
||||
SkOPOBJASSERT(fIntersections, close_to(pt.fX, axisIntercept, conicVals));
|
||||
double lineT = (pt.fY - top) / (bottom - top);
|
||||
if (this->pinTs(&conicT, &lineT, &pt, kPointInitialized)
|
||||
|
@ -101,11 +101,9 @@
|
||||
#ifdef SK_RELEASE
|
||||
#define SkDEBUGRELEASE(a, b) b
|
||||
#define SkDEBUGPARAMS(...)
|
||||
#define SkDEBUGCODE_(...)
|
||||
#else
|
||||
#define SkDEBUGRELEASE(a, b) a
|
||||
#define SkDEBUGPARAMS(...) , __VA_ARGS__
|
||||
#define SkDEBUGCODE_(...) __VA_ARGS__ // temporary until SkDEBUGCODE is fixed
|
||||
#endif
|
||||
|
||||
#if DEBUG_VALIDATE == 0
|
||||
|
@ -218,7 +218,7 @@ private:
|
||||
SkOpDebugBool fIsLine;
|
||||
SkOpDebugBool fDeleted;
|
||||
SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState);
|
||||
SkDEBUGCODE_(SkTSect<TCurve, OppCurve>* fDebugSect);
|
||||
SkDEBUGCODE(SkTSect<TCurve, OppCurve>* fDebugSect);
|
||||
PATH_OPS_DEBUG_T_SECT_CODE(int fID);
|
||||
friend class SkTSect<TCurve, OppCurve>;
|
||||
friend class SkTSect<OppCurve, TCurve>;
|
||||
@ -332,7 +332,7 @@ private:
|
||||
SkTSpan<TCurve, OppCurve>* fDeleted;
|
||||
int fActiveCount;
|
||||
SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState);
|
||||
SkDEBUGCODE_(SkTSect<OppCurve, TCurve>* fOppSect);
|
||||
SkDEBUGCODE(SkTSect<OppCurve, TCurve>* fOppSect);
|
||||
PATH_OPS_DEBUG_T_SECT_CODE(int fID);
|
||||
PATH_OPS_DEBUG_T_SECT_CODE(int fDebugCount);
|
||||
#if DEBUG_T_SECT
|
||||
@ -819,7 +819,7 @@ void SkTSpan<TCurve, OppCurve>::validateBounded() const {
|
||||
#if DEBUG_VALIDATE
|
||||
const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded;
|
||||
while (testBounded) {
|
||||
SkDEBUGCODE_(const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBounded);
|
||||
SkDEBUGCODE(const SkTSpan<OppCurve, TCurve>* overlap = testBounded->fBounded);
|
||||
SkASSERT(!overlap->fDeleted);
|
||||
#if DEBUG_T_SECT
|
||||
SkASSERT(((this->debugID() ^ overlap->debugID()) & 1) == 1);
|
||||
|
Loading…
Reference in New Issue
Block a user