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

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

Issue 2671853003: [SPInvalidation] Use GeometryMapper in PaintLayerClipper for paint. (Closed)
Patch Set: none Created 3 years, 10 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 2798 matching lines...) Expand 10 before | Expand all | Expand 10 after
2809 2809
2810 void FrameView::updateWidgetGeometriesIfNeeded() { 2810 void FrameView::updateWidgetGeometriesIfNeeded() {
2811 if (!m_needsUpdateWidgetGeometries) 2811 if (!m_needsUpdateWidgetGeometries)
2812 return; 2812 return;
2813 2813
2814 m_needsUpdateWidgetGeometries = false; 2814 m_needsUpdateWidgetGeometries = false;
2815 2815
2816 updateWidgetGeometries(); 2816 updateWidgetGeometries();
2817 } 2817 }
2818 2818
2819 GeometryMapper* FrameView::geometryMapper() {
2820 return frame().localFrameRoot()->view()->m_geometryMapper.get();
pdr. 2017/02/10 20:51:04 Can you DCHECK here to prevent calling without sp?
chrishtr 2017/02/10 22:56:36 Done.
2821 }
2822
2819 void FrameView::updateAllLifecyclePhases() { 2823 void FrameView::updateAllLifecyclePhases() {
2820 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal( 2824 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(
2821 DocumentLifecycle::PaintClean); 2825 DocumentLifecycle::PaintClean);
2822 } 2826 }
2823 2827
2824 // TODO(chrishtr): add a scrolling update lifecycle phase. 2828 // TODO(chrishtr): add a scrolling update lifecycle phase.
2825 void FrameView::updateLifecycleToCompositingCleanPlusScrolling() { 2829 void FrameView::updateLifecycleToCompositingCleanPlusScrolling() {
2826 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 2830 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
2827 updateAllLifecyclePhasesExceptPaint(); 2831 updateAllLifecyclePhasesExceptPaint();
2828 } else { 2832 } else {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 if (LayoutViewItem view = layoutViewItem()) { 2942 if (LayoutViewItem view = layoutViewItem()) {
2939 forAllNonThrottledFrameViews([](FrameView& frameView) { 2943 forAllNonThrottledFrameViews([](FrameView& frameView) {
2940 frameView.checkDoesNotNeedLayout(); 2944 frameView.checkDoesNotNeedLayout();
2941 frameView.m_allowsLayoutInvalidationAfterLayoutClean = false; 2945 frameView.m_allowsLayoutInvalidationAfterLayoutClean = false;
2942 }); 2946 });
2943 2947
2944 { 2948 {
2945 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", 2949 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data",
2946 InspectorUpdateLayerTreeEvent::data(m_frame.get())); 2950 InspectorUpdateLayerTreeEvent::data(m_frame.get()));
2947 2951
2952 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
2953 if (!m_geometryMapper)
2954 m_geometryMapper.reset(new GeometryMapper());
2955 // TODO(chrishtr): the cache only needs to be invalidated if one or more
2956 // of
pdr. 2017/02/10 20:51:03 nit: indentation
chrishtr 2017/02/10 22:56:36 Moved.
2957 // the property tree nodes changed.
2958 m_geometryMapper->clearCache();
pdr. 2017/02/10 20:51:03 Can we assert that geometry mapper isn't used betw
chrishtr 2017/02/10 22:56:36 Done, via suggestion from above.
2959 }
2960
2948 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 2961 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
2949 view.compositor()->updateIfNeededRecursive(); 2962 view.compositor()->updateIfNeededRecursive();
2950 } else { 2963 } else {
2951 forAllNonThrottledFrameViews([](FrameView& frameView) { 2964 forAllNonThrottledFrameViews([](FrameView& frameView) {
2952 frameView.layoutView()->layer()->updateDescendantDependentFlags(); 2965 frameView.layoutView()->layer()->updateDescendantDependentFlags();
2953 frameView.layoutView()->commitPendingSelection(); 2966 frameView.layoutView()->commitPendingSelection();
2954 }); 2967 });
2955 } 2968 }
2956 2969
2957 scrollContentsIfNeededRecursive(); 2970 scrollContentsIfNeededRecursive();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3025 } 3038 }
3026 m_anchoringAdjustmentQueue.clear(); 3039 m_anchoringAdjustmentQueue.clear();
3027 } 3040 }
3028 3041
3029 void FrameView::prePaint() { 3042 void FrameView::prePaint() {
3030 TRACE_EVENT0("blink", "FrameView::prePaint"); 3043 TRACE_EVENT0("blink", "FrameView::prePaint");
3031 3044
3032 if (!m_paintController) 3045 if (!m_paintController)
3033 m_paintController = PaintController::create(); 3046 m_paintController = PaintController::create();
3034 3047
3035 if (!m_geometryMapper)
3036 m_geometryMapper.reset(new GeometryMapper());
3037 // TODO(chrishtr): the cache only needs to be invalidated if one or more of
3038 // the property tree nodes changed.
3039 m_geometryMapper->clearCache();
3040
3041 forAllNonThrottledFrameViews([](FrameView& frameView) { 3048 forAllNonThrottledFrameViews([](FrameView& frameView) {
3042 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); 3049 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint);
3043 if (frameView.canThrottleRendering()) { 3050 if (frameView.canThrottleRendering()) {
3044 // This frame can be throttled but not throttled, meaning we are not in an 3051 // This frame can be throttled but not throttled, meaning we are not in an
3045 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and 3052 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and
3046 // we need to propagate the flags into the ancestor chain so that 3053 // we need to propagate the flags into the ancestor chain so that
3047 // PrePaintTreeWalk can reach this frame. 3054 // PrePaintTreeWalk can reach this frame.
3048 frameView.setNeedsPaintPropertyUpdate(); 3055 frameView.setNeedsPaintPropertyUpdate();
3049 } 3056 }
3050 }); 3057 });
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
5101 std::unique_ptr<CompositorAnimationTimeline> timeline) { 5108 std::unique_ptr<CompositorAnimationTimeline> timeline) {
5102 m_animationTimeline = std::move(timeline); 5109 m_animationTimeline = std::move(timeline);
5103 } 5110 }
5104 5111
5105 void FrameView::setAnimationHost( 5112 void FrameView::setAnimationHost(
5106 std::unique_ptr<CompositorAnimationHost> host) { 5113 std::unique_ptr<CompositorAnimationHost> host) {
5107 m_animationHost = std::move(host); 5114 m_animationHost = std::move(host);
5108 } 5115 }
5109 5116
5110 } // namespace blink 5117 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698