fix debug version of cubicpair detected by asan
TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2435063002 Review-Url: https://chromiumcodereview.appspot.com/2435063002
This commit is contained in:
parent
95f6b399e5
commit
4209dcbbc6
@ -11,11 +11,7 @@
|
||||
#include "SkPath.h"
|
||||
#include "SkPathOpsPoint.h"
|
||||
|
||||
struct SkDCubicPair {
|
||||
const SkDCubic& first() const { return (const SkDCubic&) pts[0]; }
|
||||
const SkDCubic& second() const { return (const SkDCubic&) pts[3]; }
|
||||
SkDPoint pts[7];
|
||||
};
|
||||
struct SkDCubicPair;
|
||||
|
||||
struct SkDCubic {
|
||||
static const int kPointCount = 4;
|
||||
@ -157,4 +153,26 @@ inline int other_two(int one, int two) {
|
||||
return 1 >> (3 - (one ^ two)) ^ 3;
|
||||
}
|
||||
|
||||
struct SkDCubicPair {
|
||||
const SkDCubic first() const {
|
||||
#ifdef SK_DEBUG
|
||||
SkDCubic result;
|
||||
result.debugSet(&pts[0]);
|
||||
return result;
|
||||
#else
|
||||
return (const SkDCubic&) pts[0];
|
||||
#endif
|
||||
}
|
||||
const SkDCubic second() const {
|
||||
#ifdef SK_DEBUG
|
||||
SkDCubic result;
|
||||
result.debugSet(&pts[3]);
|
||||
return result;
|
||||
#else
|
||||
return (const SkDCubic&) pts[3];
|
||||
#endif
|
||||
}
|
||||
SkDPoint pts[7];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user