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

Unified Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 844023003: Delete InvalidationReason. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/rendering/RenderBox.h ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index 1851da41bbb630924d03ad2ab593392d9baf6562..bba60cbee34147befdddde1aeed6ecb8462c75d5 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -2996,43 +2996,6 @@ PositionWithAffinity RenderBox::positionForPoint(const LayoutPoint& point)
return createPositionWithAffinity(firstPositionInOrBeforeNode(node()));
}
-InvalidationReason RenderBox::getPaintInvalidationReason(const RenderLayerModelObject& paintInvalidationContainer,
- const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRect& newBounds, const LayoutPoint& newLocation)
-{
- InvalidationReason invalidationReason = RenderBoxModelObject::getPaintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
- if (invalidationReason != InvalidationNone && invalidationReason != InvalidationIncremental)
- return invalidationReason;
-
- if (!style()->hasBackground() && !style()->hasBoxDecorations())
- return invalidationReason;
-
- LayoutSize oldBorderBoxSize = computePreviousBorderBoxSize(oldBounds.size());
- LayoutSize newBorderBoxSize = size();
-
- if (oldBorderBoxSize == newBorderBoxSize)
- return invalidationReason;
-
- // FIXME: Implement correct incremental invalidation for visual overflowing effects.
- if (style()->hasVisualOverflowingEffect() || style()->hasFilter())
- return InvalidationBorderBoxChange;
-
- if (style()->hasBorderRadius()) {
- // If a border-radius exists and width/height is smaller than radius width/height,
- // we need to fully invalidate to cover the changed radius.
- RoundedRect oldRoundedRect = style()->getRoundedBorderFor(LayoutRect(LayoutPoint(0, 0), oldBorderBoxSize));
- RoundedRect newRoundedRect = style()->getRoundedBorderFor(LayoutRect(LayoutPoint(0, 0), newBorderBoxSize));
- if (oldRoundedRect.radii() != newRoundedRect.radii())
- return InvalidationBorderBoxChange;
- }
-
- if (oldBorderBoxSize.width() != newBorderBoxSize.width() && mustInvalidateBackgroundOrBorderPaintOnWidthChange())
- return InvalidationBorderBoxChange;
- if (oldBorderBoxSize.height() != newBorderBoxSize.height() && mustInvalidateBackgroundOrBorderPaintOnHeightChange())
- return InvalidationBorderBoxChange;
-
- return InvalidationIncremental;
-}
-
void RenderBox::addVisualEffectOverflow()
{
if (!style()->hasVisualOverflowingEffect())
« no previous file with comments | « sky/engine/core/rendering/RenderBox.h ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698