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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 #include "platform/ScriptForbiddenScope.h" | 99 #include "platform/ScriptForbiddenScope.h" |
100 #include "platform/TraceEvent.h" | 100 #include "platform/TraceEvent.h" |
101 #include "platform/TracedValue.h" | 101 #include "platform/TracedValue.h" |
102 #include "platform/fonts/FontCache.h" | 102 #include "platform/fonts/FontCache.h" |
103 #include "platform/geometry/DoubleRect.h" | 103 #include "platform/geometry/DoubleRect.h" |
104 #include "platform/geometry/FloatRect.h" | 104 #include "platform/geometry/FloatRect.h" |
105 #include "platform/geometry/LayoutRect.h" | 105 #include "platform/geometry/LayoutRect.h" |
106 #include "platform/graphics/GraphicsContext.h" | 106 #include "platform/graphics/GraphicsContext.h" |
107 #include "platform/graphics/GraphicsLayer.h" | 107 #include "platform/graphics/GraphicsLayer.h" |
108 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 108 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
109 #include "platform/graphics/compositing/PaintArtifactCompositor.h" | |
109 #include "platform/graphics/paint/CullRect.h" | 110 #include "platform/graphics/paint/CullRect.h" |
110 #include "platform/graphics/paint/PaintController.h" | 111 #include "platform/graphics/paint/PaintController.h" |
111 #include "platform/graphics/paint/ScopedPaintChunkProperties.h" | 112 #include "platform/graphics/paint/ScopedPaintChunkProperties.h" |
112 #include "platform/json/JSONValues.h" | 113 #include "platform/json/JSONValues.h" |
113 #include "platform/scheduler/CancellableTaskFactory.h" | 114 #include "platform/scheduler/CancellableTaskFactory.h" |
114 #include "platform/scroll/ScrollAnimatorBase.h" | 115 #include "platform/scroll/ScrollAnimatorBase.h" |
115 #include "platform/scroll/ScrollbarTheme.h" | 116 #include "platform/scroll/ScrollbarTheme.h" |
116 #include "platform/text/TextStream.h" | 117 #include "platform/text/TextStream.h" |
117 #include "public/platform/WebDisplayItemList.h" | 118 #include "public/platform/WebDisplayItemList.h" |
118 #include "public/platform/WebFrameScheduler.h" | 119 #include "public/platform/WebFrameScheduler.h" |
(...skipping 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2755 for (auto& child : graphicsLayer->children()) | 2756 for (auto& child : graphicsLayer->children()) |
2756 synchronizedPaintRecursively(child); | 2757 synchronizedPaintRecursively(child); |
2757 } | 2758 } |
2758 | 2759 |
2759 void FrameView::pushPaintArtifactToCompositor() | 2760 void FrameView::pushPaintArtifactToCompositor() |
2760 { | 2761 { |
2761 TRACE_EVENT0("blink", "FrameView::pushPaintArtifactToCompositor"); | 2762 TRACE_EVENT0("blink", "FrameView::pushPaintArtifactToCompositor"); |
2762 | 2763 |
2763 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 2764 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
2764 | 2765 |
2765 const PaintArtifact& paintArtifact = m_paintController->paintArtifact(); | 2766 if (!m_paintArtifactCompositor) { |
2767 m_paintArtifactCompositor = PaintArtifactCompositor::create(); | |
2768 Page* page = frame().page(); | |
2769 if (!page) | |
pdr.
2016/09/15 20:53:07
Can this ever happen? If it does, wouldn't we forg
chrishtr
2016/09/15 21:05:39
I don't know if it can happen. What I can say is t
pdr.
2016/09/15 21:08:17
Why don't we just bail then, instead of creating a
chrishtr
2016/09/15 21:11:04
Done.
| |
2770 return; | |
2766 | 2771 |
2767 Page* page = frame().page(); | 2772 page->chromeClient().attachRootLayer(m_paintArtifactCompositor->getWebLa yer(), &frame()); |
2768 if (!page) | 2773 } |
2769 return; | 2774 m_paintArtifactCompositor->update(m_paintController->paintArtifact()); |
2770 page->chromeClient().didPaint(paintArtifact); | |
2771 } | 2775 } |
2772 | 2776 |
2773 void FrameView::updateStyleAndLayoutIfNeededRecursive() | 2777 void FrameView::updateStyleAndLayoutIfNeededRecursive() |
2774 { | 2778 { |
2775 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime"); | 2779 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.StyleAndLayout.UpdateTime"); |
2776 updateStyleAndLayoutIfNeededRecursiveInternal(); | 2780 updateStyleAndLayoutIfNeededRecursiveInternal(); |
2777 } | 2781 } |
2778 | 2782 |
2779 void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() | 2783 void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() |
2780 { | 2784 { |
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4360 } | 4364 } |
4361 | 4365 |
4362 bool FrameView::canThrottleRendering() const | 4366 bool FrameView::canThrottleRendering() const |
4363 { | 4367 { |
4364 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4368 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4365 return false; | 4369 return false; |
4366 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4370 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
4367 } | 4371 } |
4368 | 4372 |
4369 } // namespace blink | 4373 } // namespace blink |
OLD | NEW |