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

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

Issue 791023006: Delete invalidateTreeIfNeeded. (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/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderObject.cpp
diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
index 6d671c1865ffd3ed5b8a03445bfd83c589bcc492..049847492550148a836806f8c4a474676bba05f2 100644
--- a/sky/engine/core/rendering/RenderObject.cpp
+++ b/sky/engine/core/rendering/RenderObject.cpp
@@ -99,7 +99,6 @@ struct SameSizeAsRenderObject {
#endif
#endif
unsigned m_bitfields;
- unsigned m_bitfields2;
LayoutRect rect; // Stores the previous paint invalidation rect.
LayoutPoint position; // Stores the previous position from the paint invalidation container.
};
@@ -1218,21 +1217,6 @@ const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA
return view();
}
-void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
-{
- // If we didn't need paint invalidation then our children don't need as well.
- // Skip walking down the tree as everything should be fine below us.
- if (!shouldCheckForPaintInvalidation(paintInvalidationState))
- return;
-
- clearPaintInvalidationState(paintInvalidationState);
-
- for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling()) {
- if (!child->isOutOfFlowPositioned())
- child->invalidateTreeIfNeeded(paintInvalidationState);
- }
-}
-
void RenderObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
{
if (paintInvalidationContainer == this)
@@ -1472,11 +1456,6 @@ void RenderObject::setStyle(PassRefPtr<RenderStyle> style)
if (RenderBlock* container = containingBlock())
container->setNeedsOverflowRecalcAfterStyleChange();
}
-
- if (updatedDiff.needsPaintInvalidationLayer())
- toRenderLayerModelObject(this)->layer()->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
- else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvalidationObject())
- setShouldDoFullPaintInvalidation(true);
}
void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
@@ -2014,7 +1993,6 @@ void RenderObject::scheduleRelayout()
void RenderObject::forceLayout()
{
setSelfNeedsLayout(true);
- setShouldDoFullPaintInvalidation(true);
layout();
}
@@ -2242,27 +2220,6 @@ bool RenderObject::isRelayoutBoundaryForInspector() const
return objectIsRelayoutBoundary(this);
}
-void RenderObject::setShouldDoFullPaintInvalidation(bool b, MarkingBehavior markBehavior)
-{
- if (markBehavior == MarkContainingBlockChain && b) {
- ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidation);
- // FIXME(sky): Do we still need this here?
- frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called not during FrameView::updateLayoutAndStyleForPainting().
ojan 2015/01/12 21:14:21 This is the only potential change in behavior. I r
- }
-}
-
-void RenderObject::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState)
-{
- // paintInvalidationStateIsDirty should be kept in sync with the
- // booleans that are cleared below.
- ASSERT(paintInvalidationState.forceCheckForPaintInvalidation() || paintInvalidationStateIsDirty());
- setShouldDoFullPaintInvalidation(false);
- setOnlyNeededPositionedMovementLayout(false);
- setNeededLayoutBecauseOfChildren(false);
- setShouldInvalidateOverflowForPaint(false);
- setLayoutDidGetCalled(false);
-}
-
bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document)
{
return document.lifecycle().stateAllowsRenderTreeMutations();
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698