| 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/NotImplemented.h" | 7 #include "platform/NotImplemented.h" |
| 8 #include "platform/TraceEvent.h" | 8 #include "platform/TraceEvent.h" |
| 9 #include "platform/graphics/GraphicsLayer.h" | 9 #include "platform/graphics/GraphicsLayer.h" |
| 10 #include "platform/graphics/paint/DrawingDisplayItem.h" | 10 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 WTF::String PaintController::displayItemListAsDebugString(const DisplayItemList&
list) const | 556 WTF::String PaintController::displayItemListAsDebugString(const DisplayItemList&
list) const |
| 557 { | 557 { |
| 558 StringBuilder stringBuilder; | 558 StringBuilder stringBuilder; |
| 559 size_t i = 0; | 559 size_t i = 0; |
| 560 for (auto it = list.begin(); it != list.end(); ++it, ++i) { | 560 for (auto it = list.begin(); it != list.end(); ++it, ++i) { |
| 561 const DisplayItem& displayItem = *it; | 561 const DisplayItem& displayItem = *it; |
| 562 if (i) | 562 if (i) |
| 563 stringBuilder.append(",\n"); | 563 stringBuilder.append(",\n"); |
| 564 stringBuilder.append(String::format("{index: %d, ", (int)i)); | 564 stringBuilder.append(String::format("{index: %d, ", (int)i)); |
| 565 displayItem.dumpPropertiesAsDebugString(stringBuilder); | 565 displayItem.dumpPropertiesAsDebugString(stringBuilder); |
| 566 stringBuilder.append(", cacheIsValid: "); | 566 if (displayItem.hasValidClient()) { |
| 567 stringBuilder.append(clientCacheIsValid(displayItem.client()) ? "true" :
"false"); | 567 stringBuilder.append(", cacheIsValid: "); |
| 568 stringBuilder.append(clientCacheIsValid(displayItem.client()) ? "tru
e" : "false"); |
| 569 } |
| 568 stringBuilder.append('}'); | 570 stringBuilder.append('}'); |
| 569 } | 571 } |
| 570 return stringBuilder.toString(); | 572 return stringBuilder.toString(); |
| 571 } | 573 } |
| 572 | 574 |
| 573 void PaintController::showDebugData() const | 575 void PaintController::showDebugData() const |
| 574 { | 576 { |
| 575 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri
ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); | 577 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri
ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); |
| 576 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m
_newDisplayItemList).utf8().data()); | 578 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m
_newDisplayItemList).utf8().data()); |
| 577 } | 579 } |
| 578 | 580 |
| 579 #endif // ifndef NDEBUG | 581 #endif // ifndef NDEBUG |
| 580 | 582 |
| 581 } // namespace blink | 583 } // namespace blink |
| OLD | NEW |