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

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

Issue 2334113002: Let slimmingPaintInvalidation plumbing work for spv1 (Closed)
Patch Set: - Created 4 years, 3 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 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
2637 2637
2638 if (view.compositor()->inCompositingMode()) 2638 if (view.compositor()->inCompositingMode())
2639 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded (); 2639 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded ();
2640 2640
2641 m_frame->document()->rootScrollerController()->didUpdateComposit ing(); 2641 m_frame->document()->rootScrollerController()->didUpdateComposit ing();
2642 updateCompositedSelectionIfNeeded(); 2642 updateCompositedSelectionIfNeeded();
2643 } 2643 }
2644 } 2644 }
2645 2645
2646 if (targetState >= DocumentLifecycle::PrePaintClean) { 2646 if (targetState >= DocumentLifecycle::PrePaintClean) {
2647 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 2647 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
2648 updatePaintProperties(); 2648 updatePaintProperties();
2649 } 2649 }
2650 2650
2651 if (targetState == DocumentLifecycle::PaintClean) { 2651 if (targetState == DocumentLifecycle::PaintClean) {
2652 if (!m_frame->document()->printing()) 2652 if (!m_frame->document()->printing())
2653 synchronizedPaint(); 2653 synchronizedPaint();
2654 2654
2655 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 2655 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
2656 pushPaintArtifactToCompositor(); 2656 pushPaintArtifactToCompositor();
2657 2657
2658 DCHECK(!view.hasPendingSelection()); 2658 DCHECK(!view.hasPendingSelection());
2659 DCHECK((m_frame->document()->printing() && lifecycle().state() == Do cumentLifecycle::PaintInvalidationClean) 2659 DCHECK((m_frame->document()->printing() && lifecycle().state() == Do cumentLifecycle::PaintInvalidationClean)
2660 || lifecycle().state() == DocumentLifecycle::PaintClean); 2660 || lifecycle().state() == DocumentLifecycle::PaintClean);
2661 } 2661 }
2662 2662
2663 forAllNonThrottledFrameViews([](FrameView& frameView) { 2663 forAllNonThrottledFrameViews([](FrameView& frameView) {
2664 frameView.checkDoesNotNeedLayout(); 2664 frameView.checkDoesNotNeedLayout();
2665 frameView.m_allowsLayoutInvalidationAfterLayoutClean = true; 2665 frameView.m_allowsLayoutInvalidationAfterLayoutClean = true;
2666 }); 2666 });
2667 } 2667 }
2668 2668
2669 updateViewportIntersectionsForSubtree(targetState); 2669 updateViewportIntersectionsForSubtree(targetState);
2670 } 2670 }
2671 2671
2672 void FrameView::updatePaintProperties() 2672 void FrameView::updatePaintProperties()
2673 { 2673 {
2674 TRACE_EVENT0("blink", "FrameView::updatePaintProperties"); 2674 TRACE_EVENT0("blink", "FrameView::updatePaintProperties");
2675 2675
2676 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2676 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
2677 2677
2678 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::InPrePaint); }); 2678 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::InPrePaint); });
2679 PrePaintTreeWalk().walk(*this); 2679 PrePaintTreeWalk().walk(*this);
2680 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::PrePaintClean); }); 2680 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle( ).advanceTo(DocumentLifecycle::PrePaintClean); });
2681 } 2681 }
2682 2682
2683 void FrameView::synchronizedPaint() 2683 void FrameView::synchronizedPaint()
2684 { 2684 {
2685 TRACE_EVENT0("blink", "FrameView::synchronizedPaint"); 2685 TRACE_EVENT0("blink", "FrameView::synchronizedPaint");
2686 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); 2686 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime");
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4352 } 4352 }
4353 4353
4354 bool FrameView::canThrottleRendering() const 4354 bool FrameView::canThrottleRendering() const
4355 { 4355 {
4356 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4356 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4357 return false; 4357 return false;
4358 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4358 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4359 } 4359 }
4360 4360
4361 } // namespace blink 4361 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698