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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp

Issue 2868073002: PaintLayerClipper: Remove CHECK_CLIP_RECTS build mode. (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
index cbd9264a48d3326a3b15a24597f45b8479e01b09..e22c633c66c3012d3968f2262a50c821c7e1cc30 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
@@ -264,20 +264,6 @@ LayoutRect PaintLayerClipper::LocalClipRect(
return clip_rect;
}
-#ifdef CHECK_CLIP_RECTS
-#define CHECK_RECTS_EQ(expected, actual) \
- do { \
- bool matches = \
- (expected.isEmpty() && actual.isEmpty()) || expected == actual; \
- if (!matches) { \
- LOG(ERROR) << "Rects don't match for m_layer=" \
- << m_layer.layoutObject()->debugName() \
- << " expected=" << expected.toString() \
- << " actual=" << actual.toString(); \
- } \
- } while (false);
-#endif
-
void PaintLayerClipper::CalculateRectsWithGeometryMapper(
const ClipRectsContext& context,
const LayoutRect& paint_dirty_rect,
@@ -319,17 +305,6 @@ void PaintLayerClipper::CalculateRectsWithGeometryMapper(
foreground_rect.SetHasRadius(true);
}
}
-
-#ifdef CHECK_CLIP_RECTS
- ClipRect testBackgroundRect, testForegroundRect;
- LayoutRect testLayerBounds;
- PaintLayerClipper(m_layer, nullptr)
- .calculateRects(context, paintDirtyRect, testLayerBounds,
- testBackgroundRect, testForegroundRect, offsetFromRoot);
- CHECK_RECTS_EQ(testBackgroundRect, backgroundRect);
- CHECK_RECTS_EQ(testForegroundRect, foregroundRect);
- CHECK_RECTS_EQ(testLayerBounds, layerBounds);
-#endif
}
void PaintLayerClipper::CalculateRects(
@@ -564,11 +539,6 @@ void PaintLayerClipper::CalculateBackgroundClipRect(
}
CalculateBackgroundClipRectWithGeometryMapper(context, output);
-#ifdef CHECK_CLIP_RECTS
- ClipRect testBackgroundClipRect =
- PaintLayerClipper(m_layer, nullptr).backgroundClipRect(context);
- CHECK_RECTS_EQ(testBackgroundClipRect, output);
-#endif
return;
}
DCHECK(layer_.Parent());
« 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