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