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

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

Issue 2186643002: 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: none 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
158 void PaintController::processNewItem(DisplayItem& displayItem) 165 void PaintController::processNewItem(DisplayItem& displayItem)
159 { 166 {
160 DCHECK(!m_constructionDisabled); 167 DCHECK(!m_constructionDisabled);
161 168
162 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 169 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
163 if (!isSkippingCache()) { 170 if (!isSkippingCache()) {
164 if (displayItem.isCacheable()) { 171 if (displayItem.isCacheable()) {
165 // Mark the client shouldKeepAlive under this PaintController. 172 // Mark the client shouldKeepAlive under this PaintController.
166 // The status will end after the new display items are committed. 173 // The status will end after the new display items are committed.
167 displayItem.client().beginShouldKeepAlive(this); 174 displayItem.client().beginShouldKeepAlive(this);
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 614
608 void PaintController::showDebugData() const 615 void PaintController::showDebugData() const
609 { 616 {
610 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); 617 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data());
611 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data()); 618 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data());
612 } 619 }
613 620
614 #endif // ifndef NDEBUG 621 #endif // ifndef NDEBUG
615 622
616 } // namespace blink 623 } // 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