| 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 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3021 if (scroller) { | 3021 if (scroller) { |
| 3022 DCHECK(scroller->scrollAnchor()); | 3022 DCHECK(scroller->scrollAnchor()); |
| 3023 scroller->scrollAnchor()->adjust(); | 3023 scroller->scrollAnchor()->adjust(); |
| 3024 } | 3024 } |
| 3025 } | 3025 } |
| 3026 m_anchoringAdjustmentQueue.clear(); | 3026 m_anchoringAdjustmentQueue.clear(); |
| 3027 } | 3027 } |
| 3028 | 3028 |
| 3029 void FrameView::prePaint() { | 3029 void FrameView::prePaint() { |
| 3030 TRACE_EVENT0("blink", "FrameView::prePaint"); | 3030 TRACE_EVENT0("blink", "FrameView::prePaint"); |
| 3031 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); | |
| 3032 | 3031 |
| 3033 if (!m_paintController) | 3032 if (!m_paintController) |
| 3034 m_paintController = PaintController::create(); | 3033 m_paintController = PaintController::create(); |
| 3035 | 3034 |
| 3036 if (!m_geometryMapper) | 3035 if (!m_geometryMapper) |
| 3037 m_geometryMapper.reset(new GeometryMapper()); | 3036 m_geometryMapper.reset(new GeometryMapper()); |
| 3038 // TODO(chrishtr): the cache only needs to be invalidated if one or more of | 3037 // TODO(chrishtr): the cache only needs to be invalidated if one or more of |
| 3039 // the property tree nodes changed. | 3038 // the property tree nodes changed. |
| 3040 m_geometryMapper->clearCache(); | 3039 m_geometryMapper->clearCache(); |
| 3041 | 3040 |
| 3042 forAllNonThrottledFrameViews([](FrameView& frameView) { | 3041 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 3043 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); | 3042 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); |
| 3044 if (frameView.canThrottleRendering()) { | 3043 if (frameView.canThrottleRendering()) { |
| 3045 // This frame can be throttled but not throttled, meaning we are not in an | 3044 // This frame can be throttled but not throttled, meaning we are not in an |
| 3046 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and | 3045 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and |
| 3047 // we need to propagate the flags into the ancestor chain so that | 3046 // we need to propagate the flags into the ancestor chain so that |
| 3048 // PrePaintTreeWalk can reach this frame. | 3047 // PrePaintTreeWalk can reach this frame. |
| 3049 frameView.setNeedsPaintPropertyUpdate(); | 3048 frameView.setNeedsPaintPropertyUpdate(); |
| 3050 } | 3049 } |
| 3051 }); | 3050 }); |
| 3052 | 3051 |
| 3053 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 3052 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 3053 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); |
| 3054 PrePaintTreeWalk(*m_geometryMapper).walk(*this); | 3054 PrePaintTreeWalk(*m_geometryMapper).walk(*this); |
| 3055 } |
| 3055 | 3056 |
| 3056 forAllNonThrottledFrameViews([](FrameView& frameView) { | 3057 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 3057 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); | 3058 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); |
| 3058 }); | 3059 }); |
| 3059 } | 3060 } |
| 3060 | 3061 |
| 3061 void FrameView::notifyPaint(const PaintController& paintController) const { | 3062 void FrameView::notifyPaint(const PaintController& paintController) const { |
| 3062 DCHECK(m_frame->document()); | 3063 DCHECK(m_frame->document()); |
| 3063 PaintTiming::from(*m_frame->document()) | 3064 PaintTiming::from(*m_frame->document()) |
| 3064 .notifyPaint(paintController.firstPainted(), | 3065 .notifyPaint(paintController.firstPainted(), |
| (...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5095 std::unique_ptr<CompositorAnimationTimeline> timeline) { | 5096 std::unique_ptr<CompositorAnimationTimeline> timeline) { |
| 5096 m_animationTimeline = std::move(timeline); | 5097 m_animationTimeline = std::move(timeline); |
| 5097 } | 5098 } |
| 5098 | 5099 |
| 5099 void FrameView::setAnimationHost( | 5100 void FrameView::setAnimationHost( |
| 5100 std::unique_ptr<CompositorAnimationHost> host) { | 5101 std::unique_ptr<CompositorAnimationHost> host) { |
| 5101 m_animationHost = std::move(host); | 5102 m_animationHost = std::move(host); |
| 5102 } | 5103 } |
| 5103 | 5104 |
| 5104 } // namespace blink | 5105 } // namespace blink |
| OLD | NEW |