mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1294455 - disable slow debug validation in Skia. r=mchang
MozReview-Commit-ID: 2vbnbuJARh3
This commit is contained in:
parent
1dba66163c
commit
1d7feaf99c
@ -154,6 +154,8 @@
|
||||
|
||||
#define SK_RASTERIZE_EVEN_ROUNDING
|
||||
|
||||
#define SK_DISABLE_SLOW_DEBUG_VALIDATION 1
|
||||
|
||||
#define MOZ_SKIA 1
|
||||
|
||||
#ifndef MOZ_IMPLICIT
|
||||
|
@ -13,7 +13,9 @@ void SkAlphaRuns::reset(int width) {
|
||||
SkASSERT(width > 0);
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
#ifndef SK_DISABLE_SLOW_DEBUG_VALIDATION
|
||||
sk_memset16((uint16_t*)fRuns, (uint16_t)(-42), width);
|
||||
#endif
|
||||
#endif
|
||||
fRuns[0] = SkToS16(width);
|
||||
fRuns[width] = 0;
|
||||
@ -25,6 +27,7 @@ void SkAlphaRuns::reset(int width) {
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
void SkAlphaRuns::assertValid(int y, int maxStep) const {
|
||||
#ifndef SK_DISABLE_SLOW_DEBUG_VALIDATION
|
||||
int max = (y + 1) * maxStep - (y == maxStep - 1);
|
||||
|
||||
const int16_t* runs = fRuns;
|
||||
@ -35,6 +38,7 @@ void SkAlphaRuns::reset(int width) {
|
||||
alpha += *runs;
|
||||
runs += *runs;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void SkAlphaRuns::dump() const {
|
||||
@ -56,6 +60,7 @@ void SkAlphaRuns::reset(int width) {
|
||||
}
|
||||
|
||||
void SkAlphaRuns::validate() const {
|
||||
#ifndef SK_DISABLE_SLOW_DEBUG_VALIDATION
|
||||
SkASSERT(fWidth > 0);
|
||||
|
||||
int count = 0;
|
||||
@ -68,5 +73,6 @@ void SkAlphaRuns::reset(int width) {
|
||||
runs += *runs;
|
||||
}
|
||||
SkASSERT(count == fWidth);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1706,6 +1706,7 @@ void SkCanvas::onClipRegion(const SkRegion& rgn, SkRegion::Op op) {
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
void SkCanvas::validateClip() const {
|
||||
#ifndef SK_DISABLE_SLOW_DEBUG_VALIDATION
|
||||
// construct clipRgn from the clipstack
|
||||
const SkBaseDevice* device = this->getDevice();
|
||||
if (!device) {
|
||||
@ -1736,6 +1737,7 @@ void SkCanvas::validateClip() const {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user