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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1791543005: InPrePaint document state and PrePaintTreeWalk class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unnecessary changes in LayoutObject.h Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "core/loader/FrameLoader.h" 73 #include "core/loader/FrameLoader.h"
74 #include "core/loader/FrameLoaderClient.h" 74 #include "core/loader/FrameLoaderClient.h"
75 #include "core/page/AutoscrollController.h" 75 #include "core/page/AutoscrollController.h"
76 #include "core/page/ChromeClient.h" 76 #include "core/page/ChromeClient.h"
77 #include "core/page/FocusController.h" 77 #include "core/page/FocusController.h"
78 #include "core/page/FrameTree.h" 78 #include "core/page/FrameTree.h"
79 #include "core/page/Page.h" 79 #include "core/page/Page.h"
80 #include "core/page/scrolling/ScrollingCoordinator.h" 80 #include "core/page/scrolling/ScrollingCoordinator.h"
81 #include "core/paint/FramePainter.h" 81 #include "core/paint/FramePainter.h"
82 #include "core/paint/PaintLayer.h" 82 #include "core/paint/PaintLayer.h"
83 #include "core/paint/PaintPropertyTreeBuilder.h" 83 #include "core/paint/PrePaintTreeWalk.h"
84 #include "core/plugins/PluginView.h" 84 #include "core/plugins/PluginView.h"
85 #include "core/style/ComputedStyle.h" 85 #include "core/style/ComputedStyle.h"
86 #include "core/svg/SVGDocumentExtensions.h" 86 #include "core/svg/SVGDocumentExtensions.h"
87 #include "core/svg/SVGSVGElement.h" 87 #include "core/svg/SVGSVGElement.h"
88 #include "platform/Histogram.h" 88 #include "platform/Histogram.h"
89 #include "platform/HostWindow.h" 89 #include "platform/HostWindow.h"
90 #include "platform/RuntimeEnabledFeatures.h" 90 #include "platform/RuntimeEnabledFeatures.h"
91 #include "platform/ScriptForbiddenScope.h" 91 #include "platform/ScriptForbiddenScope.h"
92 #include "platform/TraceEvent.h" 92 #include "platform/TraceEvent.h"
93 #include "platform/TracedValue.h" 93 #include "platform/TracedValue.h"
(...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 } 2395 }
2396 2396
2397 void FrameView::updateLifecycleToLayoutClean() 2397 void FrameView::updateLifecycleToLayoutClean()
2398 { 2398 {
2399 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(OnlyUpToLayo utClean); 2399 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(OnlyUpToLayo utClean);
2400 } 2400 }
2401 2401
2402 void FrameView::scheduleVisualUpdateForPaintInvalidationIfNeeded() 2402 void FrameView::scheduleVisualUpdateForPaintInvalidationIfNeeded()
2403 { 2403 {
2404 LocalFrame* localFrameRoot = frame().localFrameRoot(); 2404 LocalFrame* localFrameRoot = frame().localFrameRoot();
2405 if (!localFrameRoot->view()->m_isUpdatingAllLifecyclePhases || lifecycle().s tate() >= DocumentLifecycle::PaintInvalidationClean) { 2405 if (!localFrameRoot->view()->m_isUpdatingAllLifecyclePhases || lifecycle().s tate() >= DocumentLifecycle::PrePaintClean) {
2406 // Schedule visual update to process the paint invalidation in the next cycle. 2406 // Schedule visual update to process the paint invalidation in the next cycle.
2407 localFrameRoot->scheduleVisualUpdateUnlessThrottled(); 2407 localFrameRoot->scheduleVisualUpdateUnlessThrottled();
2408 } 2408 }
2409 // Otherwise the paint invalidation will be handled in paint invalidation ph ase of this cycle. 2409 // Otherwise the paint invalidation will be handled in paint invalidation ph ase of this cycle.
2410 } 2410 }
2411 2411
2412 // TODO(leviw): We don't assert lifecycle information from documents in child Pl uginViews. 2412 // TODO(leviw): We don't assert lifecycle information from documents in child Pl uginViews.
2413 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) 2413 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases)
2414 { 2414 {
2415 Optional<TemporaryChange<bool>> isUpdatingAllLifecyclePhasesScope; 2415 Optional<TemporaryChange<bool>> isUpdatingAllLifecyclePhasesScope;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 2474
2475 updateViewportIntersectionsForSubtree(phases); 2475 updateViewportIntersectionsForSubtree(phases);
2476 } 2476 }
2477 2477
2478 void FrameView::updatePaintProperties() 2478 void FrameView::updatePaintProperties()
2479 { 2479 {
2480 TRACE_EVENT0("blink", "FrameView::updatePaintProperties"); 2480 TRACE_EVENT0("blink", "FrameView::updatePaintProperties");
2481 2481
2482 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2482 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2483 2483
2484 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::InUpdatePaintProperties); }); 2484 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::InPrePaint); });
2485 PaintPropertyTreeBuilder().buildPropertyTrees(*this); 2485 PrePaintTreeWalk().walk(*this);
2486 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::UpdatePaintPropertiesClean); }); 2486 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::PrePaintClean); });
2487 } 2487 }
2488 2488
2489 void FrameView::synchronizedPaint() 2489 void FrameView::synchronizedPaint()
2490 { 2490 {
2491 TRACE_EVENT0("blink", "FrameView::synchronizedPaint"); 2491 TRACE_EVENT0("blink", "FrameView::synchronizedPaint");
2492 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); 2492 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime");
2493 2493
2494 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame())); 2494 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame()));
2495 2495
2496 LayoutViewItem view = layoutViewItem(); 2496 LayoutViewItem view = layoutViewItem();
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
4107 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4107 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4108 } 4108 }
4109 4109
4110 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4110 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4111 { 4111 {
4112 ASSERT(layoutView()); 4112 ASSERT(layoutView());
4113 return *layoutView(); 4113 return *layoutView();
4114 } 4114 }
4115 4115
4116 } // namespace blink 4116 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698