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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 #include "platform/TracedValue.h" | 98 #include "platform/TracedValue.h" |
99 #include "platform/fonts/FontCache.h" | 99 #include "platform/fonts/FontCache.h" |
100 #include "platform/geometry/DoubleRect.h" | 100 #include "platform/geometry/DoubleRect.h" |
101 #include "platform/geometry/FloatRect.h" | 101 #include "platform/geometry/FloatRect.h" |
102 #include "platform/geometry/LayoutRect.h" | 102 #include "platform/geometry/LayoutRect.h" |
103 #include "platform/graphics/GraphicsContext.h" | 103 #include "platform/graphics/GraphicsContext.h" |
104 #include "platform/graphics/GraphicsLayer.h" | 104 #include "platform/graphics/GraphicsLayer.h" |
105 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 105 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
106 #include "platform/graphics/paint/CullRect.h" | 106 #include "platform/graphics/paint/CullRect.h" |
107 #include "platform/graphics/paint/PaintController.h" | 107 #include "platform/graphics/paint/PaintController.h" |
| 108 #include "platform/graphics/paint/ScopedPaintChunkProperties.h" |
108 #include "platform/scheduler/CancellableTaskFactory.h" | 109 #include "platform/scheduler/CancellableTaskFactory.h" |
109 #include "platform/scroll/ScrollAnimatorBase.h" | 110 #include "platform/scroll/ScrollAnimatorBase.h" |
110 #include "platform/scroll/ScrollbarTheme.h" | 111 #include "platform/scroll/ScrollbarTheme.h" |
111 #include "platform/text/TextStream.h" | 112 #include "platform/text/TextStream.h" |
112 #include "public/platform/WebDisplayItemList.h" | 113 #include "public/platform/WebDisplayItemList.h" |
113 #include "public/platform/WebFrameScheduler.h" | 114 #include "public/platform/WebFrameScheduler.h" |
114 #include "wtf/CurrentTime.h" | 115 #include "wtf/CurrentTime.h" |
115 #include "wtf/PtrUtil.h" | 116 #include "wtf/PtrUtil.h" |
116 #include "wtf/StdLibExtras.h" | 117 #include "wtf/StdLibExtras.h" |
117 #include "wtf/TemporaryChange.h" | 118 #include "wtf/TemporaryChange.h" |
(...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2633 layoutViewItem.layer()->clearNeedsRepaintRecursively(); | 2634 layoutViewItem.layer()->clearNeedsRepaintRecursively(); |
2634 }); | 2635 }); |
2635 } | 2636 } |
2636 | 2637 |
2637 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) | 2638 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) |
2638 { | 2639 { |
2639 if (graphicsLayer->drawsContent()) { | 2640 if (graphicsLayer->drawsContent()) { |
2640 // Usually this is not needed because the PaintLayer will setup the chun
k properties | 2641 // Usually this is not needed because the PaintLayer will setup the chun
k properties |
2641 // altogether. However in debug builds the GraphicsLayer could paint deb
ug background before | 2642 // altogether. However in debug builds the GraphicsLayer could paint deb
ug background before |
2642 // we ever reach the PaintLayer. | 2643 // we ever reach the PaintLayer. |
| 2644 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
2643 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 2645 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
2644 PaintChunkProperties properties; | 2646 PaintChunkProperties properties; |
2645 properties.transform = m_rootTransform; | 2647 properties.transform = m_rootTransform; |
2646 properties.clip = m_rootClip; | 2648 properties.clip = m_rootClip; |
2647 properties.effect = m_rootEffect; | 2649 properties.effect = m_rootEffect; |
2648 graphicsLayer->getPaintController().updateCurrentPaintChunkPropertie
s(properties); | 2650 scopedPaintChunkProperties.emplace(graphicsLayer->getPaintController
(), *layoutView(), DisplayItem::DebugRedFill, properties); |
2649 } | 2651 } |
2650 graphicsLayer->paint(nullptr); | 2652 graphicsLayer->paint(nullptr); |
2651 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | |
2652 graphicsLayer->getPaintController().updateCurrentPaintChunkPropertie
s(PaintChunkProperties()); | |
2653 } | 2653 } |
2654 | 2654 |
2655 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 2655 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
2656 if (GraphicsLayer* maskLayer = graphicsLayer->maskLayer()) | 2656 if (GraphicsLayer* maskLayer = graphicsLayer->maskLayer()) |
2657 synchronizedPaintRecursively(maskLayer); | 2657 synchronizedPaintRecursively(maskLayer); |
2658 if (GraphicsLayer* contentsClippingMaskLayer = graphicsLayer->contentsCl
ippingMaskLayer()) | 2658 if (GraphicsLayer* contentsClippingMaskLayer = graphicsLayer->contentsCl
ippingMaskLayer()) |
2659 synchronizedPaintRecursively(contentsClippingMaskLayer); | 2659 synchronizedPaintRecursively(contentsClippingMaskLayer); |
2660 if (GraphicsLayer* replicaLayer = graphicsLayer->replicaLayer()) | 2660 if (GraphicsLayer* replicaLayer = graphicsLayer->replicaLayer()) |
2661 synchronizedPaintRecursively(replicaLayer); | 2661 synchronizedPaintRecursively(replicaLayer); |
2662 } | 2662 } |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4273 } | 4273 } |
4274 | 4274 |
4275 bool FrameView::canThrottleRendering() const | 4275 bool FrameView::canThrottleRendering() const |
4276 { | 4276 { |
4277 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4277 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4278 return false; | 4278 return false; |
4279 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4279 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
4280 } | 4280 } |
4281 | 4281 |
4282 } // namespace blink | 4282 } // namespace blink |
OLD | NEW |