OLD | NEW |
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/graphics/GraphicsLayer.h" | 7 #include "platform/graphics/GraphicsLayer.h" |
8 #include "platform/graphics/paint/DrawingDisplayItem.h" | 8 #include "platform/graphics/paint/DrawingDisplayItem.h" |
9 #include "platform/tracing/TraceEvent.h" | 9 #include "platform/tracing/TraceEvent.h" |
10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return; | 138 return; |
139 | 139 |
140 #if DCHECK_IS_ON() | 140 #if DCHECK_IS_ON() |
141 // Also remove the index pointing to the removed display item. | 141 // Also remove the index pointing to the removed display item. |
142 IndicesByClientMap::iterator it = m_newDisplayItemIndicesByClient.find( | 142 IndicesByClientMap::iterator it = m_newDisplayItemIndicesByClient.find( |
143 &m_newDisplayItemList.last().client()); | 143 &m_newDisplayItemList.last().client()); |
144 if (it != m_newDisplayItemIndicesByClient.end()) { | 144 if (it != m_newDisplayItemIndicesByClient.end()) { |
145 Vector<size_t>& indices = it->value; | 145 Vector<size_t>& indices = it->value; |
146 if (!indices.isEmpty() && | 146 if (!indices.isEmpty() && |
147 indices.last() == (m_newDisplayItemList.size() - 1)) | 147 indices.last() == (m_newDisplayItemList.size() - 1)) |
148 indices.removeLast(); | 148 indices.pop_back(); |
149 } | 149 } |
150 #endif | 150 #endif |
151 | 151 |
152 if (RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled() && | 152 if (RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled() && |
153 isCheckingUnderInvalidation()) { | 153 isCheckingUnderInvalidation()) { |
154 if (m_skippedProbableUnderInvalidationCount) { | 154 if (m_skippedProbableUnderInvalidationCount) { |
155 --m_skippedProbableUnderInvalidationCount; | 155 --m_skippedProbableUnderInvalidationCount; |
156 } else { | 156 } else { |
157 DCHECK(m_underInvalidationCheckingBegin); | 157 DCHECK(m_underInvalidationCheckingBegin); |
158 --m_underInvalidationCheckingBegin; | 158 --m_underInvalidationCheckingBegin; |
(...skipping 27 matching lines...) Expand all Loading... |
186 // deleted. | 186 // deleted. |
187 displayItem.client().beginShouldKeepAlive( | 187 displayItem.client().beginShouldKeepAlive( |
188 m_currentSubsequenceClients.last()); | 188 m_currentSubsequenceClients.last()); |
189 } | 189 } |
190 } | 190 } |
191 | 191 |
192 if (displayItem.getType() == DisplayItem::kSubsequence) { | 192 if (displayItem.getType() == DisplayItem::kSubsequence) { |
193 m_currentSubsequenceClients.append(&displayItem.client()); | 193 m_currentSubsequenceClients.append(&displayItem.client()); |
194 } else if (displayItem.getType() == DisplayItem::kEndSubsequence) { | 194 } else if (displayItem.getType() == DisplayItem::kEndSubsequence) { |
195 CHECK(m_currentSubsequenceClients.last() == &displayItem.client()); | 195 CHECK(m_currentSubsequenceClients.last() == &displayItem.client()); |
196 m_currentSubsequenceClients.removeLast(); | 196 m_currentSubsequenceClients.pop_back(); |
197 } | 197 } |
198 } | 198 } |
199 #endif | 199 #endif |
200 | 200 |
201 if (isSkippingCache()) | 201 if (isSkippingCache()) |
202 displayItem.setSkippedCache(); | 202 displayItem.setSkippedCache(); |
203 | 203 |
204 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 204 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
205 size_t lastChunkIndex = m_newPaintChunks.lastChunkIndex(); | 205 size_t lastChunkIndex = m_newPaintChunks.lastChunkIndex(); |
206 if (m_newPaintChunks.incrementDisplayItemIndex(displayItem)) { | 206 if (m_newPaintChunks.incrementDisplayItemIndex(displayItem)) { |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 m_currentPaintArtifact.getDisplayItemList(), showPictures) | 885 m_currentPaintArtifact.getDisplayItemList(), showPictures) |
886 .utf8() | 886 .utf8() |
887 .data()); | 887 .data()); |
888 WTFLogAlways("new display item list: [%s]\n", | 888 WTFLogAlways("new display item list: [%s]\n", |
889 displayItemListAsDebugString(m_newDisplayItemList, showPictures) | 889 displayItemListAsDebugString(m_newDisplayItemList, showPictures) |
890 .utf8() | 890 .utf8() |
891 .data()); | 891 .data()); |
892 } | 892 } |
893 | 893 |
894 } // namespace blink | 894 } // namespace blink |
OLD | NEW |