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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 899813004: Revert of Clip incremental invalidation rects for RenderBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 5 years, 10 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 | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 0eda85b297b14ee6bd05d903a5584d838902cc55..608e44d391a48c36d36f7f45c76b26620cd684c5 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -3961,7 +3961,7 @@ void RenderBox::incrementallyInvalidatePaint(const LayoutLayerModelObject& paint
LayoutSize oldBorderBoxSize = computePreviousBorderBoxSize(oldBounds.size());
LayoutSize newBorderBoxSize = size();
- // If border box size didn't change, RenderObject's incrementallyInvalidatePaint() is good.
+ // If border box size didn't change, RenderBox's incrementallyInvalidatePaint() is good.
if (oldBorderBoxSize == newBorderBoxSize)
return;
@@ -3985,7 +3985,7 @@ void RenderBox::incrementallyInvalidatePaint(const LayoutLayerModelObject& paint
positionFromPaintInvalidationBacking.y(),
deltaWidth + borderWidth,
std::max(oldBorderBoxSize.height(), newBorderBoxSize.height()));
- invalidatePaintRectClippedByOldAndNewBounds(paintInvalidationContainer, rightDeltaRect, oldBounds, newBounds);
+ invalidatePaintUsingContainer(&paintInvalidationContainer, rightDeltaRect, PaintInvalidationIncremental);
}
// Invalidate the bottom delta part and the bottom border of the old or new box which has smaller height.
@@ -3999,28 +3999,10 @@ void RenderBox::incrementallyInvalidatePaint(const LayoutLayerModelObject& paint
positionFromPaintInvalidationBacking.y() + smallerHeight - borderHeight,
std::max(oldBorderBoxSize.width(), newBorderBoxSize.width()),
deltaHeight + borderHeight);
- invalidatePaintRectClippedByOldAndNewBounds(paintInvalidationContainer, bottomDeltaRect, oldBounds, newBounds);
+ invalidatePaintUsingContainer(&paintInvalidationContainer, bottomDeltaRect, PaintInvalidationIncremental);
}
}
-void RenderBox::invalidatePaintRectClippedByOldAndNewBounds(const LayoutLayerModelObject& paintInvalidationContainer, const LayoutRect& rect, const LayoutRect& oldBounds, const LayoutRect& newBounds)
-{
- if (rect.isEmpty())
- return;
- LayoutRect rectClippedByOldBounds = intersection(rect, oldBounds);
- LayoutRect rectClippedByNewBounds = intersection(rect, newBounds);
- // Invalidate only once if the clipped rects equal.
- if (rectClippedByOldBounds == rectClippedByNewBounds) {
- invalidatePaintUsingContainer(&paintInvalidationContainer, rectClippedByOldBounds, PaintInvalidationIncremental);
- return;
- }
- // Invalidate the bigger one if one contains another. Otherwise invalidate both.
- if (!rectClippedByNewBounds.contains(rectClippedByOldBounds))
- invalidatePaintUsingContainer(&paintInvalidationContainer, rectClippedByOldBounds, PaintInvalidationIncremental);
- if (!rectClippedByOldBounds.contains(rectClippedByNewBounds))
- invalidatePaintUsingContainer(&paintInvalidationContainer, rectClippedByNewBounds, PaintInvalidationIncremental);
-}
-
void RenderBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScope)
{
ASSERT(!needsLayout());
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698