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

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

Issue 2792863002: Revert of Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: Created 3 years, 8 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 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 m_paintController = PaintController::create(); 3138 m_paintController = PaintController::create();
3139 3139
3140 forAllNonThrottledFrameViews([](FrameView& frameView) { 3140 forAllNonThrottledFrameViews([](FrameView& frameView) {
3141 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); 3141 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint);
3142 if (frameView.canThrottleRendering()) { 3142 if (frameView.canThrottleRendering()) {
3143 // This frame can be throttled but not throttled, meaning we are not in an 3143 // This frame can be throttled but not throttled, meaning we are not in an
3144 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and 3144 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and
3145 // we need to propagate the flags into the ancestor chain so that 3145 // we need to propagate the flags into the ancestor chain so that
3146 // PrePaintTreeWalk can reach this frame. 3146 // PrePaintTreeWalk can reach this frame.
3147 frameView.setNeedsPaintPropertyUpdate(); 3147 frameView.setNeedsPaintPropertyUpdate();
3148 if (auto owner = frameView.frame().ownerLayoutItem())
3149 owner.setMayNeedPaintInvalidation();
3150 } 3148 }
3151 }); 3149 });
3152 3150
3153 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { 3151 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
3154 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); 3152 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime");
3155 PrePaintTreeWalk(geometryMapper()).walk(*this); 3153 PrePaintTreeWalk(geometryMapper()).walk(*this);
3156 } 3154 }
3157 3155
3158 forAllNonThrottledFrameViews([](FrameView& frameView) { 3156 forAllNonThrottledFrameViews([](FrameView& frameView) {
3159 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); 3157 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean);
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
4965 // so they should be able to tolerate some delay in receiving replies from a 4963 // so they should be able to tolerate some delay in receiving replies from a
4966 // throttled peer. 4964 // throttled peer.
4967 return m_hiddenForThrottling && m_frame->isCrossOriginSubframe(); 4965 return m_hiddenForThrottling && m_frame->isCrossOriginSubframe();
4968 } 4966 }
4969 4967
4970 void FrameView::beginLifecycleUpdates() { 4968 void FrameView::beginLifecycleUpdates() {
4971 // Avoid pumping frames for the initially empty document. 4969 // Avoid pumping frames for the initially empty document.
4972 if (!frame().loader().stateMachine()->committedFirstRealDocumentLoad()) 4970 if (!frame().loader().stateMachine()->committedFirstRealDocumentLoad())
4973 return; 4971 return;
4974 m_lifecycleUpdatesThrottled = false; 4972 m_lifecycleUpdatesThrottled = false;
4975 if (auto owner = frame().ownerLayoutItem())
4976 owner.setMayNeedPaintInvalidation();
4977 setupRenderThrottling(); 4973 setupRenderThrottling();
4978 updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled); 4974 updateRenderThrottlingStatus(m_hiddenForThrottling, m_subtreeThrottled);
4979 // The compositor will "defer commits" for the main frame until we 4975 // The compositor will "defer commits" for the main frame until we
4980 // explicitly request them. 4976 // explicitly request them.
4981 if (frame().isMainFrame()) 4977 if (frame().isMainFrame())
4982 frame().page()->chromeClient().beginLifecycleUpdates(); 4978 frame().page()->chromeClient().beginLifecycleUpdates();
4983 } 4979 }
4984 4980
4985 void FrameView::setInitialViewportSize(const IntSize& viewportSize) { 4981 void FrameView::setInitialViewportSize(const IntSize& viewportSize) {
4986 if (viewportSize == m_initialViewportSize) 4982 if (viewportSize == m_initialViewportSize)
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
5255 void FrameView::setAnimationHost( 5251 void FrameView::setAnimationHost(
5256 std::unique_ptr<CompositorAnimationHost> host) { 5252 std::unique_ptr<CompositorAnimationHost> host) {
5257 m_animationHost = std::move(host); 5253 m_animationHost = std::move(host);
5258 } 5254 }
5259 5255
5260 LayoutUnit FrameView::caretWidth() const { 5256 LayoutUnit FrameView::caretWidth() const {
5261 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5257 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5262 } 5258 }
5263 5259
5264 } // namespace blink 5260 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698