| 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 "config.h" | 5 #include "config.h" |
| 6 #include "platform/graphics/paint/DisplayItemList.h" | 6 #include "platform/graphics/paint/DisplayItemList.h" |
| 7 | 7 |
| 8 #include "platform/NotImplemented.h" | 8 #include "platform/NotImplemented.h" |
| 9 #include "platform/TraceEvent.h" | 9 #include "platform/TraceEvent.h" |
| 10 #include "platform/graphics/paint/DrawingDisplayItem.h" | 10 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #ifndef NDEBUG | 86 #ifndef NDEBUG |
| 87 showDebugData(); | 87 showDebugData(); |
| 88 WTFLogAlways("DisplayItem %s has duplicated id with previous %s (index=%
d)\n", | 88 WTFLogAlways("DisplayItem %s has duplicated id with previous %s (index=%
d)\n", |
| 89 displayItem.asDebugString().utf8().data(), m_newDisplayItems[index].
asDebugString().utf8().data(), static_cast<int>(index)); | 89 displayItem.asDebugString().utf8().data(), m_newDisplayItems[index].
asDebugString().utf8().data(), static_cast<int>(index)); |
| 90 #endif | 90 #endif |
| 91 ASSERT_NOT_REACHED(); | 91 ASSERT_NOT_REACHED(); |
| 92 } | 92 } |
| 93 addItemToIndexIfNeeded(displayItem, m_newDisplayItems.size() - 1, m_newDispl
ayItemIndicesByClient); | 93 addItemToIndexIfNeeded(displayItem, m_newDisplayItems.size() - 1, m_newDispl
ayItemIndicesByClient); |
| 94 #endif // ENABLE(ASSERT) | 94 #endif // ENABLE(ASSERT) |
| 95 | 95 |
| 96 ASSERT(!displayItem.skippedCache()); // Only DisplayItemList can set the fla
g. | |
| 97 if (skippingCache()) | 96 if (skippingCache()) |
| 98 displayItem.setSkippedCache(); | 97 displayItem.setSkippedCache(); |
| 99 } | 98 } |
| 100 | 99 |
| 101 void DisplayItemList::beginScope() | 100 void DisplayItemList::beginScope() |
| 102 { | 101 { |
| 103 ASSERT_WITH_SECURITY_IMPLICATION(m_nextScope < UINT_MAX); | 102 ASSERT_WITH_SECURITY_IMPLICATION(m_nextScope < UINT_MAX); |
| 104 m_scopeStack.append(m_nextScope++); | 103 m_scopeStack.append(m_nextScope++); |
| 105 beginSkippingCache(); | 104 beginSkippingCache(); |
| 106 } | 105 } |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 | 619 |
| 621 void DisplayItemList::replay(GraphicsContext& context) | 620 void DisplayItemList::replay(GraphicsContext& context) |
| 622 { | 621 { |
| 623 TRACE_EVENT0("blink,benchmark", "DisplayItemList::replay"); | 622 TRACE_EVENT0("blink,benchmark", "DisplayItemList::replay"); |
| 624 ASSERT(m_newDisplayItems.isEmpty()); | 623 ASSERT(m_newDisplayItems.isEmpty()); |
| 625 for (DisplayItem& displayItem : m_currentDisplayItems) | 624 for (DisplayItem& displayItem : m_currentDisplayItems) |
| 626 displayItem.replay(context); | 625 displayItem.replay(context); |
| 627 } | 626 } |
| 628 | 627 |
| 629 } // namespace blink | 628 } // namespace blink |
| OLD | NEW |