Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 26237010: remove clipstack/region bounds assertion (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 8cf2e4b664320dea8444be7a3d6da899ae21ee17..5422e12319c59bab4b141c72732aad6bab194e54 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698