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

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

Issue 850763008: Remove assorted dead paint invalidation code. (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/RenderLayer.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 95e27c337853033607c9f9d50c779f0733dbc8d0..d39de86572233f128501a91289a9289845b445d0 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -3089,42 +3089,6 @@ bool RenderBox::hasRelativeLogicalHeight() const
|| style()->logicalMaxHeight().isPercent();
}
-void RenderBox::savePreviousBorderBoxSizeIfNeeded()
-{
- // If m_rareData is already created, always save.
- if (!m_rareData) {
- LayoutSize paintInvalidationSize = previousPaintInvalidationRect().size();
-
- // Don't save old border box size if the paint rect is empty because we'll
- // full invalidate once the paint rect becomes non-empty.
- if (paintInvalidationSize.isEmpty())
- return;
-
- // Don't save old border box size if we can use size of the old paint rect
- // as the old border box size in the next invalidation.
- if (paintInvalidationSize == size())
- return;
-
- // We need the old border box size only when the box has background or box decorations.
- if (!style()->hasBackground() && !style()->hasBoxDecorations())
- return;
- }
-
- ensureRareData().m_previousBorderBoxSize = size();
-}
-
-LayoutSize RenderBox::computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize) const
-{
- // PreviousBorderBoxSize is only valid when there is background or box decorations.
- ASSERT(style()->hasBackground() || style()->hasBoxDecorations());
-
- if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1)
- return m_rareData->m_previousBorderBoxSize;
-
- // We didn't save the old border box size because it was the same as the size of oldBounds.
- return previousBoundsSize;
-}
-
RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style)
{
backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor);
« no previous file with comments | « sky/engine/core/rendering/RenderBox.h ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698