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

Unified Diff: sky/engine/core/frame/FrameView.cpp

Issue 755843003: Remove compositing states from DocumentLifeCycle. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/frame/FrameView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/FrameView.cpp
diff --git a/sky/engine/core/frame/FrameView.cpp b/sky/engine/core/frame/FrameView.cpp
index ea35547b3f5a055db6ce1962a64cc4e12bbda366..0737f1deded1cda2571366e528c0533c7ec2b110 100644
--- a/sky/engine/core/frame/FrameView.cpp
+++ b/sky/engine/core/frame/FrameView.cpp
@@ -409,6 +409,8 @@ void FrameView::layout(bool allowSubtree)
void FrameView::invalidateTreeIfNeeded()
{
+ lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation);
+
ASSERT(renderView());
RenderView& rootForPaintInvalidation = *renderView();
ASSERT(!rootForPaintInvalidation.needsLayout());
@@ -426,6 +428,8 @@ void FrameView::invalidateTreeIfNeeded()
if (m_frame->selection().isCaretBoundsDirty())
m_frame->selection().invalidateCaretRect();
+
+ lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
}
DocumentLifecycle& FrameView::lifecycle() const
@@ -798,7 +802,7 @@ void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
}
RELEASE_ASSERT(!needsLayout());
- ASSERT(document->lifecycle().state() >= DocumentLifecycle::CompositingClean);
+ ASSERT(document->lifecycle().state() >= DocumentLifecycle::PaintInvalidationClean);
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Paint", "data", InspectorPaintEvent::data(renderView, rect));
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::currentCallStack());
@@ -872,7 +876,7 @@ void FrameView::updateLayoutAndStyleForPainting()
if (RenderView* view = renderView()) {
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "InvalidateTreeAndUpdateIframes", TRACE_EVENT_SCOPE_PROCESS, "frame", m_frame.get());
- invalidateTreeIfNeededRecursive();
+ invalidateTreeIfNeeded();
view->updateIFramesAfterLayout();
}
@@ -904,14 +908,6 @@ void FrameView::updateLayoutAndStyleIfNeededRecursive()
}
-void FrameView::invalidateTreeIfNeededRecursive()
ojan 2014/12/02 17:16:42 This used to walk the frame tree. No need for this
-{
- // FIXME: We should be more aggressive at cutting tree traversals.
- lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation);
- invalidateTreeIfNeeded();
- lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean);
-}
-
void FrameView::forceLayout(bool allowSubtree)
{
layout(allowSubtree);
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698