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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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. | 96 ASSERT(!displayItem.skippedCache()); // Only DisplayItemList can set the fla g. |
97 if (skippingCache()) | 97 if (skippingCache()) { |
98 // TODO(wangxianzhu): Distinguish skippingCache and uncacheablility. | |
chrishtr
2015/09/08 22:48:00
What's the difference exactly?
Xianzhu
2015/09/09 16:50:33
Wanted to distinguish "skip-cache but cacheable" a
| |
98 displayItem.setSkippedCache(); | 99 displayItem.setSkippedCache(); |
100 displayItem.setUncacheable(); | |
101 } | |
99 } | 102 } |
100 | 103 |
101 void DisplayItemList::beginScope() | 104 void DisplayItemList::beginScope() |
102 { | 105 { |
103 ASSERT_WITH_SECURITY_IMPLICATION(m_nextScope < UINT_MAX); | 106 ASSERT_WITH_SECURITY_IMPLICATION(m_nextScope < UINT_MAX); |
104 m_scopeStack.append(m_nextScope++); | 107 m_scopeStack.append(m_nextScope++); |
105 beginSkippingCache(); | 108 beginSkippingCache(); |
106 } | 109 } |
107 | 110 |
108 void DisplayItemList::endScope() | 111 void DisplayItemList::endScope() |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 | 623 |
621 void DisplayItemList::replay(GraphicsContext& context) | 624 void DisplayItemList::replay(GraphicsContext& context) |
622 { | 625 { |
623 TRACE_EVENT0("blink,benchmark", "DisplayItemList::replay"); | 626 TRACE_EVENT0("blink,benchmark", "DisplayItemList::replay"); |
624 ASSERT(m_newDisplayItems.isEmpty()); | 627 ASSERT(m_newDisplayItems.isEmpty()); |
625 for (DisplayItem& displayItem : m_currentDisplayItems) | 628 for (DisplayItem& displayItem : m_currentDisplayItems) |
626 displayItem.replay(context); | 629 displayItem.replay(context); |
627 } | 630 } |
628 | 631 |
629 } // namespace blink | 632 } // namespace blink |
OLD | NEW |