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 2781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 if (!page) | 2792 if (!page) |
2793 return; | 2793 return; |
2794 | 2794 |
2795 if (!m_paintArtifactCompositor) { | 2795 if (!m_paintArtifactCompositor) { |
2796 m_paintArtifactCompositor = PaintArtifactCompositor::create(); | 2796 m_paintArtifactCompositor = PaintArtifactCompositor::create(); |
2797 page->chromeClient().attachRootLayer(m_paintArtifactCompositor->getWebLa
yer(), &frame()); | 2797 page->chromeClient().attachRootLayer(m_paintArtifactCompositor->getWebLa
yer(), &frame()); |
2798 } | 2798 } |
2799 | 2799 |
2800 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime"); | 2800 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime"); |
2801 | 2801 |
2802 m_paintArtifactCompositor->update(m_paintController->paintArtifact()); | 2802 m_paintArtifactCompositor->update(m_paintController->paintArtifact(), m_pain
tController->paintChunksRasterInvalidationTrackingMap()); |
| 2803 } |
| 2804 |
| 2805 std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON(LayerTreeFlags fla
gs) |
| 2806 { |
| 2807 return m_paintArtifactCompositor->layersAsJSON(flags); |
2803 } | 2808 } |
2804 | 2809 |
2805 void FrameView::updateStyleAndLayoutIfNeededRecursive() | 2810 void FrameView::updateStyleAndLayoutIfNeededRecursive() |
2806 { | 2811 { |
2807 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime"); | 2812 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime"); |
2808 updateStyleAndLayoutIfNeededRecursiveInternal(); | 2813 updateStyleAndLayoutIfNeededRecursiveInternal(); |
2809 } | 2814 } |
2810 | 2815 |
2811 void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() | 2816 void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() |
2812 { | 2817 { |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3139 void FrameView::setTracksPaintInvalidations(bool trackPaintInvalidations) | 3144 void FrameView::setTracksPaintInvalidations(bool trackPaintInvalidations) |
3140 { | 3145 { |
3141 if (trackPaintInvalidations == isTrackingPaintInvalidations()) | 3146 if (trackPaintInvalidations == isTrackingPaintInvalidations()) |
3142 return; | 3147 return; |
3143 | 3148 |
3144 for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().trav
erseNext()) { | 3149 for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().trav
erseNext()) { |
3145 if (!frame->isLocalFrame()) | 3150 if (!frame->isLocalFrame()) |
3146 continue; | 3151 continue; |
3147 if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()
) { | 3152 if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()
) { |
3148 layoutView.frameView()->m_trackedObjectPaintInvalidations = wrapUniq
ue(trackPaintInvalidations ? new Vector<ObjectPaintInvalidation> : nullptr); | 3153 layoutView.frameView()->m_trackedObjectPaintInvalidations = wrapUniq
ue(trackPaintInvalidations ? new Vector<ObjectPaintInvalidation> : nullptr); |
3149 layoutView.compositor()->setTracksPaintInvalidations(trackPaintInval
idations); | 3154 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 3155 m_paintController->setTracksRasterInvalidations(trackPaintInvali
dations); |
| 3156 m_paintArtifactCompositor->setTracksRasterInvalidations(trackPai
ntInvalidations); |
| 3157 } else { |
| 3158 layoutView.compositor()->setTracksRasterInvalidations(trackPaint
Invalidations); |
| 3159 } |
3150 } | 3160 } |
3151 } | 3161 } |
3152 | 3162 |
3153 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), | 3163 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), |
3154 "FrameView::setTracksPaintInvalidations", TRACE_EVENT_SCOPE_GLOBAL, "ena
bled", trackPaintInvalidations); | 3164 "FrameView::setTracksPaintInvalidations", TRACE_EVENT_SCOPE_GLOBAL, "ena
bled", trackPaintInvalidations); |
3155 } | 3165 } |
3156 | 3166 |
3157 void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, Pa
intInvalidationReason reason) | 3167 void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, Pa
intInvalidationReason reason) |
3158 { | 3168 { |
3159 if (!m_trackedObjectPaintInvalidations) | 3169 if (!m_trackedObjectPaintInvalidations) |
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4417 } | 4427 } |
4418 | 4428 |
4419 bool FrameView::canThrottleRendering() const | 4429 bool FrameView::canThrottleRendering() const |
4420 { | 4430 { |
4421 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4431 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4422 return false; | 4432 return false; |
4423 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4433 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
4424 } | 4434 } |
4425 | 4435 |
4426 } // namespace blink | 4436 } // namespace blink |
OLD | NEW |