OLD | NEW |
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 3089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3100 | 3100 |
3101 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 3101 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
3102 view.Compositor()->UpdateIfNeededRecursive(target_state); | 3102 view.Compositor()->UpdateIfNeededRecursive(target_state); |
3103 } else { | 3103 } else { |
3104 ForAllNonThrottledFrameViews([](FrameView& frame_view) { | 3104 ForAllNonThrottledFrameViews([](FrameView& frame_view) { |
3105 frame_view.GetLayoutView()->Layer()->UpdateDescendantDependentFlags(); | 3105 frame_view.GetLayoutView()->Layer()->UpdateDescendantDependentFlags(); |
3106 frame_view.GetLayoutView()->CommitPendingSelection(); | 3106 frame_view.GetLayoutView()->CommitPendingSelection(); |
3107 }); | 3107 }); |
3108 } | 3108 } |
3109 | 3109 |
3110 if (target_state == DocumentLifecycle::kCompositingInputsClean) { | 3110 if (target_state >= DocumentLifecycle::kCompositingClean) { |
3111 DCHECK_EQ(Lifecycle().GetState(), | 3111 ScrollContentsIfNeededRecursive(); |
3112 DocumentLifecycle::kCompositingInputsClean); | 3112 |
3113 return; | 3113 frame_->GetPage() |
| 3114 ->GlobalRootScrollerController() |
| 3115 .DidUpdateCompositing(); |
3114 } | 3116 } |
3115 | 3117 |
3116 ScrollContentsIfNeededRecursive(); | |
3117 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() || | |
3118 Lifecycle().GetState() >= DocumentLifecycle::kCompositingClean); | |
3119 | |
3120 frame_->GetPage()->GlobalRootScrollerController().DidUpdateCompositing(); | |
3121 | |
3122 if (target_state >= DocumentLifecycle::kPrePaintClean) { | 3118 if (target_state >= DocumentLifecycle::kPrePaintClean) { |
3123 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 3119 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
3124 InvalidateTreeIfNeededRecursive(); | 3120 InvalidateTreeIfNeededRecursive(); |
3125 | 3121 |
3126 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 3122 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
3127 if (view.Compositor()->InCompositingMode()) | 3123 if (view.Compositor()->InCompositingMode()) |
3128 GetScrollingCoordinator()->UpdateAfterCompositingChangeIfNeeded(); | 3124 GetScrollingCoordinator()->UpdateAfterCompositingChangeIfNeeded(); |
3129 } | 3125 } |
3130 | 3126 |
3131 if (LocalFrame* local_frame = frame_->LocalFrameRoot()) { | 3127 if (LocalFrame* local_frame = frame_->LocalFrameRoot()) { |
3132 // This is needed since, at present, the ScrollingCoordinator doesn't | 3128 // This is needed since, at present, the ScrollingCoordinator doesn't |
3133 // send rects for oopif sub-frames. | 3129 // send rects for oopif sub-frames. |
3134 // TODO(wjmaclean): Remove this pathway when ScrollingCoordinator | 3130 // TODO(wjmaclean): Remove this pathway when ScrollingCoordinator |
3135 // operates on a per-frame basis. https://crbug.com/680606 | 3131 // operates on a per-frame basis. https://crbug.com/680606 |
3136 GetFrame() | 3132 GetFrame() |
3137 .GetPage() | 3133 .GetPage() |
3138 ->GetChromeClient() | 3134 ->GetChromeClient() |
3139 .UpdateEventRectsForSubframeIfNecessary(local_frame); | 3135 .UpdateEventRectsForSubframeIfNecessary(local_frame); |
3140 } | 3136 } |
3141 UpdateCompositedSelectionIfNeeded(); | 3137 UpdateCompositedSelectionIfNeeded(); |
| 3138 |
| 3139 // TODO(pdr): prePaint should be under the "Paint" devtools timeline |
| 3140 // step for slimming paint v2. |
| 3141 PrePaint(); |
3142 } | 3142 } |
3143 | |
3144 // TODO(pdr): prePaint should be under the "Paint" devtools timeline step | |
3145 // for slimming paint v2. | |
3146 if (target_state >= DocumentLifecycle::kPrePaintClean) | |
3147 PrePaint(); | |
3148 } | 3143 } |
3149 | 3144 |
3150 if (target_state == DocumentLifecycle::kPaintClean) { | 3145 if (target_state == DocumentLifecycle::kPaintClean) { |
3151 if (!frame_->GetDocument()->Printing() || | 3146 if (!frame_->GetDocument()->Printing() || |
3152 RuntimeEnabledFeatures::printBrowserEnabled()) | 3147 RuntimeEnabledFeatures::printBrowserEnabled()) |
3153 PaintTree(); | 3148 PaintTree(); |
3154 | 3149 |
3155 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 3150 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
3156 Optional<CompositorElementIdSet> composited_element_ids = | 3151 Optional<CompositorElementIdSet> composited_element_ids = |
3157 CompositorElementIdSet(); | 3152 CompositorElementIdSet(); |
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5354 void FrameView::SetAnimationHost( | 5349 void FrameView::SetAnimationHost( |
5355 std::unique_ptr<CompositorAnimationHost> host) { | 5350 std::unique_ptr<CompositorAnimationHost> host) { |
5356 animation_host_ = std::move(host); | 5351 animation_host_ = std::move(host); |
5357 } | 5352 } |
5358 | 5353 |
5359 LayoutUnit FrameView::CaretWidth() const { | 5354 LayoutUnit FrameView::CaretWidth() const { |
5360 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5355 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5361 } | 5356 } |
5362 | 5357 |
5363 } // namespace blink | 5358 } // namespace blink |
OLD | NEW |