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); | |
3113 return; | |
3114 } | |
3115 | 3112 |
3116 ScrollContentsIfNeededRecursive(); | 3113 frame_->GetPage() |
3117 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() || | 3114 ->GlobalRootScrollerController() |
3118 Lifecycle().GetState() >= DocumentLifecycle::kCompositingClean); | 3115 .DidUpdateCompositing(); |
3119 | 3116 |
3120 frame_->GetPage()->GlobalRootScrollerController().DidUpdateCompositing(); | 3117 if (target_state >= DocumentLifecycle::kPrePaintClean) { |
flackr
2017/04/28 19:38:18
Can we unnest this condition if there's no follow-
smcgruer
2017/04/28 19:43:44
Uh. Yes. I am silly.
| |
3118 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | |
3119 InvalidateTreeIfNeededRecursive(); | |
3121 | 3120 |
3122 if (target_state >= DocumentLifecycle::kPrePaintClean) { | 3121 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
3123 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 3122 if (view.Compositor()->InCompositingMode()) |
3124 InvalidateTreeIfNeededRecursive(); | 3123 GetScrollingCoordinator()->UpdateAfterCompositingChangeIfNeeded(); |
3124 } | |
3125 | 3125 |
3126 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 3126 if (LocalFrame* local_frame = frame_->LocalFrameRoot()) { |
3127 if (view.Compositor()->InCompositingMode()) | 3127 // This is needed since, at present, the ScrollingCoordinator |
3128 GetScrollingCoordinator()->UpdateAfterCompositingChangeIfNeeded(); | 3128 // doesn't send rects for oopif sub-frames. |
3129 // TODO(wjmaclean): Remove this pathway when ScrollingCoordinator | |
3130 // operates on a per-frame basis. https://crbug.com/680606 | |
3131 GetFrame() | |
3132 .GetPage() | |
3133 ->GetChromeClient() | |
3134 .UpdateEventRectsForSubframeIfNecessary(local_frame); | |
3135 } | |
3136 UpdateCompositedSelectionIfNeeded(); | |
3129 } | 3137 } |
3130 | 3138 |
3131 if (LocalFrame* local_frame = frame_->LocalFrameRoot()) { | 3139 // TODO(pdr): prePaint should be under the "Paint" devtools timeline |
3132 // This is needed since, at present, the ScrollingCoordinator doesn't | 3140 // step for slimming paint v2. |
3133 // send rects for oopif sub-frames. | 3141 if (target_state >= DocumentLifecycle::kPrePaintClean) |
flackr
2017/04/28 19:38:18
Unless my eyes deceive me, this is the identical c
smcgruer
2017/04/28 19:43:44
Done.
| |
3134 // TODO(wjmaclean): Remove this pathway when ScrollingCoordinator | 3142 PrePaint(); |
3135 // operates on a per-frame basis. https://crbug.com/680606 | |
3136 GetFrame() | |
3137 .GetPage() | |
3138 ->GetChromeClient() | |
3139 .UpdateEventRectsForSubframeIfNecessary(local_frame); | |
3140 } | |
3141 UpdateCompositedSelectionIfNeeded(); | |
3142 } | 3143 } |
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 } | 3144 } |
3149 | 3145 |
3150 if (target_state == DocumentLifecycle::kPaintClean) { | 3146 if (target_state == DocumentLifecycle::kPaintClean) { |
3151 if (!frame_->GetDocument()->Printing() || | 3147 if (!frame_->GetDocument()->Printing() || |
3152 RuntimeEnabledFeatures::printBrowserEnabled()) | 3148 RuntimeEnabledFeatures::printBrowserEnabled()) |
3153 PaintTree(); | 3149 PaintTree(); |
3154 | 3150 |
3155 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 3151 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
3156 Optional<CompositorElementIdSet> composited_element_ids = | 3152 Optional<CompositorElementIdSet> composited_element_ids = |
3157 CompositorElementIdSet(); | 3153 CompositorElementIdSet(); |
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5354 void FrameView::SetAnimationHost( | 5350 void FrameView::SetAnimationHost( |
5355 std::unique_ptr<CompositorAnimationHost> host) { | 5351 std::unique_ptr<CompositorAnimationHost> host) { |
5356 animation_host_ = std::move(host); | 5352 animation_host_ = std::move(host); |
5357 } | 5353 } |
5358 | 5354 |
5359 LayoutUnit FrameView::CaretWidth() const { | 5355 LayoutUnit FrameView::CaretWidth() const { |
5360 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5356 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5361 } | 5357 } |
5362 | 5358 |
5363 } // namespace blink | 5359 } // namespace blink |
OLD | NEW |