remove clipstack/region bounds assertion

BUG=skia_1720
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/26237010

git-svn-id: http://skia.googlecode.com/svn/trunk@11772 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-10-15 15:14:43 +00:00
parent 8aaac8da36
commit 0d0bb83c05

View File

@ -372,38 +372,6 @@ void SkGpuDevice::onDetachFromCanvas() {
fClipData.fClipStack = NULL;
}
#ifdef SK_DEBUG
static void check_bounds(const GrClipData& clipData,
const SkRegion& clipRegion,
int renderTargetWidth,
int renderTargetHeight) {
SkIRect devBound;
devBound.setLTRB(0, 0, renderTargetWidth, renderTargetHeight);
SkClipStack::BoundsType boundType;
SkRect canvTemp;
clipData.fClipStack->getBounds(&canvTemp, &boundType);
if (SkClipStack::kNormal_BoundsType == boundType) {
SkIRect devTemp;
canvTemp.roundOut(&devTemp);
devTemp.offset(-clipData.fOrigin.fX, -clipData.fOrigin.fY);
if (!devBound.intersect(devTemp)) {
devBound.setEmpty();
}
}
SkASSERT(devBound.contains(clipRegion.getBounds()));
}
#endif
///////////////////////////////////////////////////////////////////////////////
// call this every draw call, to ensure that the context reflects our state,
// and not the state from some other canvas/device
void SkGpuDevice::prepareDraw(const SkDraw& draw, bool forceIdentity) {
@ -420,10 +388,6 @@ void SkGpuDevice::prepareDraw(const SkDraw& draw, bool forceIdentity) {
}
fClipData.fOrigin = this->getOrigin();
#ifdef SK_DEBUG
check_bounds(fClipData, *draw.fClip, fRenderTarget->width(), fRenderTarget->height());
#endif
fContext->setClip(&fClipData);
DO_DEFERRED_CLEAR();