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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp

Issue 2197903002: Revert of Fold compositing display items into contained drawings if the drawing is a singleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/paint/PaintController.h" 5 #include "platform/graphics/paint/PaintController.h"
6 6
7 #include "platform/TraceEvent.h" 7 #include "platform/TraceEvent.h"
8 #include "platform/graphics/GraphicsLayer.h" 8 #include "platform/graphics/GraphicsLayer.h"
9 #include "platform/graphics/paint/DrawingDisplayItem.h" 9 #include "platform/graphics/paint/DrawingDisplayItem.h"
10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 --m_underInvalidationCheckingBegin; 148 --m_underInvalidationCheckingBegin;
149 } 149 }
150 } 150 }
151 #endif 151 #endif
152 m_newDisplayItemList.removeLast(); 152 m_newDisplayItemList.removeLast();
153 153
154 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 154 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
155 m_newPaintChunks.decrementDisplayItemIndex(); 155 m_newPaintChunks.decrementDisplayItemIndex();
156 } 156 }
157 157
158 const DisplayItem* PaintController::lastDisplayItem(unsigned offset)
159 {
160 if (offset < m_newDisplayItemList.size())
161 return &m_newDisplayItemList[m_newDisplayItemList.size() - offset - 1];
162 return nullptr;
163 }
164
165 void PaintController::processNewItem(DisplayItem& displayItem) 158 void PaintController::processNewItem(DisplayItem& displayItem)
166 { 159 {
167 DCHECK(!m_constructionDisabled); 160 DCHECK(!m_constructionDisabled);
168 161
169 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 162 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
170 if (!isSkippingCache()) { 163 if (!isSkippingCache()) {
171 if (displayItem.isCacheable()) { 164 if (displayItem.isCacheable()) {
172 // Mark the client shouldKeepAlive under this PaintController. 165 // Mark the client shouldKeepAlive under this PaintController.
173 // The status will end after the new display items are committed. 166 // The status will end after the new display items are committed.
174 displayItem.client().beginShouldKeepAlive(this); 167 displayItem.client().beginShouldKeepAlive(this);
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 607
615 void PaintController::showDebugData() const 608 void PaintController::showDebugData() const
616 { 609 {
617 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); 610 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data());
618 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data()); 611 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data());
619 } 612 }
620 613
621 #endif // ifndef NDEBUG 614 #endif // ifndef NDEBUG
622 615
623 } // namespace blink 616 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698