Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2116693002: PaintChunk::id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: Address chrishtr's comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
99 #include "platform/TracedValue.h" 99 #include "platform/TracedValue.h"
100 #include "platform/fonts/FontCache.h" 100 #include "platform/fonts/FontCache.h"
101 #include "platform/geometry/DoubleRect.h" 101 #include "platform/geometry/DoubleRect.h"
102 #include "platform/geometry/FloatRect.h" 102 #include "platform/geometry/FloatRect.h"
103 #include "platform/geometry/LayoutRect.h" 103 #include "platform/geometry/LayoutRect.h"
104 #include "platform/graphics/GraphicsContext.h" 104 #include "platform/graphics/GraphicsContext.h"
105 #include "platform/graphics/GraphicsLayer.h" 105 #include "platform/graphics/GraphicsLayer.h"
106 #include "platform/graphics/GraphicsLayerDebugInfo.h" 106 #include "platform/graphics/GraphicsLayerDebugInfo.h"
107 #include "platform/graphics/paint/CullRect.h" 107 #include "platform/graphics/paint/CullRect.h"
108 #include "platform/graphics/paint/PaintController.h" 108 #include "platform/graphics/paint/PaintController.h"
109 #include "platform/graphics/paint/ScopedPaintChunkProperties.h"
109 #include "platform/scheduler/CancellableTaskFactory.h" 110 #include "platform/scheduler/CancellableTaskFactory.h"
110 #include "platform/scroll/ScrollAnimatorBase.h" 111 #include "platform/scroll/ScrollAnimatorBase.h"
111 #include "platform/scroll/ScrollbarTheme.h" 112 #include "platform/scroll/ScrollbarTheme.h"
112 #include "platform/text/TextStream.h" 113 #include "platform/text/TextStream.h"
113 #include "public/platform/WebDisplayItemList.h" 114 #include "public/platform/WebDisplayItemList.h"
114 #include "public/platform/WebFrameScheduler.h" 115 #include "public/platform/WebFrameScheduler.h"
115 #include "wtf/CurrentTime.h" 116 #include "wtf/CurrentTime.h"
116 #include "wtf/PtrUtil.h" 117 #include "wtf/PtrUtil.h"
117 #include "wtf/StdLibExtras.h" 118 #include "wtf/StdLibExtras.h"
118 #include <memory> 119 #include <memory>
(...skipping 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 layoutViewItem.layer()->clearNeedsRepaintRecursively(); 2636 layoutViewItem.layer()->clearNeedsRepaintRecursively();
2636 }); 2637 });
2637 } 2638 }
2638 2639
2639 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) 2640 void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer)
2640 { 2641 {
2641 if (graphicsLayer->drawsContent()) { 2642 if (graphicsLayer->drawsContent()) {
2642 // Usually this is not needed because the PaintLayer will setup the chun k properties 2643 // Usually this is not needed because the PaintLayer will setup the chun k properties
2643 // altogether. However in debug builds the GraphicsLayer could paint deb ug background before 2644 // altogether. However in debug builds the GraphicsLayer could paint deb ug background before
2644 // we ever reach the PaintLayer. 2645 // we ever reach the PaintLayer.
2646 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties;
2645 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 2647 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
2646 PaintChunkProperties properties; 2648 PaintChunkProperties properties;
2647 properties.transform = m_rootTransform; 2649 properties.transform = m_rootTransform;
2648 properties.clip = m_rootClip; 2650 properties.clip = m_rootClip;
2649 properties.effect = m_rootEffect; 2651 properties.effect = m_rootEffect;
2650 graphicsLayer->getPaintController().updateCurrentPaintChunkPropertie s(properties); 2652 scopedPaintChunkProperties.emplace(graphicsLayer->getPaintController (), *layoutView(), DisplayItem::DebugRedFill, properties);
chrishtr 2016/07/20 00:10:38 Maybe remove in a followup.
Xianzhu 2016/07/20 00:11:32 Will upload a patch soon.
2651 } 2653 }
2652 graphicsLayer->paint(nullptr); 2654 graphicsLayer->paint(nullptr);
2653 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
2654 graphicsLayer->getPaintController().updateCurrentPaintChunkPropertie s(PaintChunkProperties());
2655 } 2655 }
2656 2656
2657 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 2657 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
2658 if (GraphicsLayer* maskLayer = graphicsLayer->maskLayer()) 2658 if (GraphicsLayer* maskLayer = graphicsLayer->maskLayer())
2659 synchronizedPaintRecursively(maskLayer); 2659 synchronizedPaintRecursively(maskLayer);
2660 if (GraphicsLayer* contentsClippingMaskLayer = graphicsLayer->contentsCl ippingMaskLayer()) 2660 if (GraphicsLayer* contentsClippingMaskLayer = graphicsLayer->contentsCl ippingMaskLayer())
2661 synchronizedPaintRecursively(contentsClippingMaskLayer); 2661 synchronizedPaintRecursively(contentsClippingMaskLayer);
2662 if (GraphicsLayer* replicaLayer = graphicsLayer->replicaLayer()) 2662 if (GraphicsLayer* replicaLayer = graphicsLayer->replicaLayer())
2663 synchronizedPaintRecursively(replicaLayer); 2663 synchronizedPaintRecursively(replicaLayer);
2664 } 2664 }
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
4286 } 4286 }
4287 4287
4288 bool FrameView::canThrottleRendering() const 4288 bool FrameView::canThrottleRendering() const
4289 { 4289 {
4290 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4290 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4291 return false; 4291 return false;
4292 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4292 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4293 } 4293 }
4294 4294
4295 } // namespace blink 4295 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698