| 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/PaintController.h" | 6 #include "platform/graphics/paint/PaintController.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/GraphicsLayer.h" | 10 #include "platform/graphics/GraphicsLayer.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 if (!displayItem.isCacheable()) | 208 if (!displayItem.isCacheable()) |
| 209 return; | 209 return; |
| 210 | 210 |
| 211 DisplayItemIndicesByClientMap::iterator it = displayItemIndicesByClient.find
(displayItem.client()); | 211 DisplayItemIndicesByClientMap::iterator it = displayItemIndicesByClient.find
(displayItem.client()); |
| 212 Vector<size_t>& indices = it == displayItemIndicesByClient.end() ? | 212 Vector<size_t>& indices = it == displayItemIndicesByClient.end() ? |
| 213 displayItemIndicesByClient.add(displayItem.client(), Vector<size_t>()).s
toredValue->value : it->value; | 213 displayItemIndicesByClient.add(displayItem.client(), Vector<size_t>()).s
toredValue->value : it->value; |
| 214 indices.append(index); | 214 indices.append(index); |
| 215 } | 215 } |
| 216 | 216 |
| 217 struct PaintController::OutOfOrderIndexContext { | 217 struct PaintController::OutOfOrderIndexContext { |
| 218 STACK_ALLOCATED(); |
| 218 OutOfOrderIndexContext(DisplayItemList::iterator begin) : nextItemToIndex(be
gin) { } | 219 OutOfOrderIndexContext(DisplayItemList::iterator begin) : nextItemToIndex(be
gin) { } |
| 219 | 220 |
| 220 DisplayItemList::iterator nextItemToIndex; | 221 DisplayItemList::iterator nextItemToIndex; |
| 221 DisplayItemIndicesByClientMap displayItemIndicesByClient; | 222 DisplayItemIndicesByClientMap displayItemIndicesByClient; |
| 222 }; | 223 }; |
| 223 | 224 |
| 224 DisplayItemList::iterator PaintController::findOutOfOrderCachedItem(const Displa
yItem::Id& id, OutOfOrderIndexContext& context) | 225 DisplayItemList::iterator PaintController::findOutOfOrderCachedItem(const Displa
yItem::Id& id, OutOfOrderIndexContext& context) |
| 225 { | 226 { |
| 226 ASSERT(clientCacheIsValid(id.client)); | 227 ASSERT(clientCacheIsValid(id.client)); |
| 227 | 228 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 569 |
| 569 void PaintController::showDebugData() const | 570 void PaintController::showDebugData() const |
| 570 { | 571 { |
| 571 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri
ng(m_currentPaintArtifact.displayItemList()).utf8().data()); | 572 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri
ng(m_currentPaintArtifact.displayItemList()).utf8().data()); |
| 572 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m
_newDisplayItemList).utf8().data()); | 573 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m
_newDisplayItemList).utf8().data()); |
| 573 } | 574 } |
| 574 | 575 |
| 575 #endif // ifndef NDEBUG | 576 #endif // ifndef NDEBUG |
| 576 | 577 |
| 577 } // namespace blink | 578 } // namespace blink |
| OLD | NEW |