| 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 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3009 m_anchoringAdjustmentQueue.clear(); | 3009 m_anchoringAdjustmentQueue.clear(); |
| 3010 } | 3010 } |
| 3011 | 3011 |
| 3012 void FrameView::prePaint() { | 3012 void FrameView::prePaint() { |
| 3013 TRACE_EVENT0("blink", "FrameView::prePaint"); | 3013 TRACE_EVENT0("blink", "FrameView::prePaint"); |
| 3014 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); | 3014 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); |
| 3015 | 3015 |
| 3016 if (!m_paintController) | 3016 if (!m_paintController) |
| 3017 m_paintController = PaintController::create(); | 3017 m_paintController = PaintController::create(); |
| 3018 | 3018 |
| 3019 if (!m_geometryMapper) |
| 3020 m_geometryMapper.reset(new GeometryMapper()); |
| 3021 // TODO(chrishtr): the cache only needs to be invalidated if one or more of |
| 3022 // the property tree nodes changed. |
| 3023 m_geometryMapper->clearCache(); |
| 3024 |
| 3019 forAllNonThrottledFrameViews([](FrameView& frameView) { | 3025 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 3020 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); | 3026 frameView.lifecycle().advanceTo(DocumentLifecycle::InPrePaint); |
| 3021 }); | 3027 }); |
| 3022 | 3028 |
| 3023 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 3029 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| 3024 PrePaintTreeWalk().walk(*this); | 3030 PrePaintTreeWalk(*m_geometryMapper).walk(*this); |
| 3025 | 3031 |
| 3026 forAllNonThrottledFrameViews([](FrameView& frameView) { | 3032 forAllNonThrottledFrameViews([](FrameView& frameView) { |
| 3027 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); | 3033 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); |
| 3028 }); | 3034 }); |
| 3029 } | 3035 } |
| 3030 | 3036 |
| 3031 void FrameView::notifyPaint(const PaintController& paintController) const { | 3037 void FrameView::notifyPaint(const PaintController& paintController) const { |
| 3032 DCHECK(m_frame->document()); | 3038 DCHECK(m_frame->document()); |
| 3033 PaintTiming::from(*m_frame->document()) | 3039 PaintTiming::from(*m_frame->document()) |
| 3034 .notifyPaint(paintController.firstPainted(), | 3040 .notifyPaint(paintController.firstPainted(), |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3120 return; | 3126 return; |
| 3121 | 3127 |
| 3122 if (!m_paintArtifactCompositor) { | 3128 if (!m_paintArtifactCompositor) { |
| 3123 m_paintArtifactCompositor = PaintArtifactCompositor::create(); | 3129 m_paintArtifactCompositor = PaintArtifactCompositor::create(); |
| 3124 page->chromeClient().attachRootLayer( | 3130 page->chromeClient().attachRootLayer( |
| 3125 m_paintArtifactCompositor->getWebLayer(), &frame()); | 3131 m_paintArtifactCompositor->getWebLayer(), &frame()); |
| 3126 } | 3132 } |
| 3127 | 3133 |
| 3128 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime"); | 3134 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime"); |
| 3129 | 3135 |
| 3136 DCHECK(m_geometryMapper.get()); |
| 3130 m_paintArtifactCompositor->update( | 3137 m_paintArtifactCompositor->update( |
| 3131 m_paintController->paintArtifact(), | 3138 m_paintController->paintArtifact(), |
| 3132 m_paintController->paintChunksRasterInvalidationTrackingMap(), | 3139 m_paintController->paintChunksRasterInvalidationTrackingMap(), |
| 3133 m_isStoringCompositedLayerDebugInfo); | 3140 m_isStoringCompositedLayerDebugInfo, *m_geometryMapper); |
| 3134 } | 3141 } |
| 3135 | 3142 |
| 3136 std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON( | 3143 std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON( |
| 3137 LayerTreeFlags flags) { | 3144 LayerTreeFlags flags) { |
| 3138 return frame() | 3145 return frame() |
| 3139 .localFrameRoot() | 3146 .localFrameRoot() |
| 3140 ->view() | 3147 ->view() |
| 3141 ->m_paintArtifactCompositor->layersAsJSON(flags); | 3148 ->m_paintArtifactCompositor->layersAsJSON(flags); |
| 3142 } | 3149 } |
| 3143 | 3150 |
| (...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5034 std::unique_ptr<CompositorAnimationTimeline> timeline) { | 5041 std::unique_ptr<CompositorAnimationTimeline> timeline) { |
| 5035 m_animationTimeline = std::move(timeline); | 5042 m_animationTimeline = std::move(timeline); |
| 5036 } | 5043 } |
| 5037 | 5044 |
| 5038 void FrameView::setAnimationHost( | 5045 void FrameView::setAnimationHost( |
| 5039 std::unique_ptr<CompositorAnimationHost> host) { | 5046 std::unique_ptr<CompositorAnimationHost> host) { |
| 5040 m_animationHost = std::move(host); | 5047 m_animationHost = std::move(host); |
| 5041 } | 5048 } |
| 5042 | 5049 |
| 5043 } // namespace blink | 5050 } // namespace blink |
| OLD | NEW |