| Index: Source/core/frame/FrameView.cpp
|
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
|
| index 502b7651f7e56a73e9f769bb0d15f57d2c667cfd..47fe632a8dbe117019963a18ed4d877f9b845a0c 100644
|
| --- a/Source/core/frame/FrameView.cpp
|
| +++ b/Source/core/frame/FrameView.cpp
|
| @@ -29,6 +29,7 @@
|
|
|
| #include "core/HTMLNames.h"
|
| #include "core/MediaTypeNames.h"
|
| +#include "core/compositing/DisplayListCompositingBuilder.h"
|
| #include "core/css/FontFaceSet.h"
|
| #include "core/css/resolver/StyleResolver.h"
|
| #include "core/dom/AXObjectCache.h"
|
| @@ -2453,6 +2454,11 @@ void FrameView::updateAllLifecyclePhases()
|
| frame().localFrameRoot()->view()->updateAllLifecyclePhasesInternal();
|
| }
|
|
|
| +void FrameView::updateAllLifecyclePhasesIncludingPaint()
|
| +{
|
| + frame().localFrameRoot()->view()->updateAllLifecyclePhasesIncludingPaintInternal();
|
| +}
|
| +
|
| // TODO(chrishtr): add a scrolling update lifecycle phase, after compositing and before invalidation.
|
| void FrameView::updateLifecycleToCompositingCleanPlusScrolling()
|
| {
|
| @@ -2490,6 +2496,50 @@ void FrameView::updateAllLifecyclePhasesInternal()
|
| ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean);
|
| }
|
|
|
| +void FrameView::paintAndComposite()
|
| +{
|
| + ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalFrame()));
|
| + LayoutView* view = layoutView();
|
| + ASSERT(view);
|
| + GraphicsLayer* rootGraphicsLayer = view->compositor()->rootGraphicsLayer();
|
| +
|
| + GraphicsContext context(rootGraphicsLayer->displayItemList());
|
| + rootGraphicsLayer->paint(context);
|
| +
|
| + WebDisplayListDiff displayListDiff;
|
| + rootGraphicsLayer->displayItemList()->commitNewDisplayItems(&displayListDiff);
|
| +
|
| + DisplayListCompositingBuilder compositingBuilder(*rootGraphicsLayer->displayItemList(), displayListDiff, *rootGraphicsLayer);
|
| + compositingBuilder.build();
|
| +}
|
| +
|
| +void FrameView::updateAllLifecyclePhasesIncludingPaintInternal()
|
| +{
|
| + // This must be called from the root frame, since it recurses down, not up. Otherwise the lifecycles of the frames might be out of sync.
|
| + ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalFrame()));
|
| + ASSERT(RuntimeEnabledFeatures::slimmingPaintCompositorLayerization());
|
| +
|
| + // Updating layout can run script, which can tear down the FrameView.
|
| + RefPtrWillBeRawPtr<FrameView> protector(this);
|
| +
|
| + updateStyleAndLayoutIfNeededRecursive();
|
| +
|
| + LayoutView* view = layoutView();
|
| + if (view) {
|
| + TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUpdateLayerTreeEvent::data(m_frame.get()));
|
| +
|
| + invalidateTreeIfNeededRecursive();
|
| + paintAndComposite();
|
| +
|
| + scrollContentsIfNeededRecursive();
|
| + updatePostLifecycleData();
|
| +
|
| + ASSERT(!view->hasPendingSelection());
|
| + }
|
| +
|
| + ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean);
|
| +}
|
| +
|
| void FrameView::updatePostLifecycleData()
|
| {
|
| LayoutView* view = layoutView();
|
|
|