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/TraceEvent.h" | 7 #include "platform/TraceEvent.h" |
8 #include "platform/graphics/GraphicsLayer.h" | 8 #include "platform/graphics/GraphicsLayer.h" |
9 #include "platform/graphics/paint/DrawingDisplayItem.h" | 9 #include "platform/graphics/paint/DrawingDisplayItem.h" |
10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
499 for (auto it = list.begin(); it != list.end(); ++it, ++i) { | 499 for (auto it = list.begin(); it != list.end(); ++it, ++i) { |
500 const DisplayItem& displayItem = *it; | 500 const DisplayItem& displayItem = *it; |
501 if (i) | 501 if (i) |
502 stringBuilder.append(",\n"); | 502 stringBuilder.append(",\n"); |
503 stringBuilder.append(String::format("{index: %d, ", (int)i)); | 503 stringBuilder.append(String::format("{index: %d, ", (int)i)); |
504 displayItem.dumpPropertiesAsDebugString(stringBuilder); | 504 displayItem.dumpPropertiesAsDebugString(stringBuilder); |
505 if (displayItem.hasValidClient()) { | 505 if (displayItem.hasValidClient()) { |
506 stringBuilder.append(", cacheIsValid: "); | 506 stringBuilder.append(", cacheIsValid: "); |
507 stringBuilder.append(clientCacheIsValid(displayItem.client()) ? "tru e" : "false"); | 507 stringBuilder.append(clientCacheIsValid(displayItem.client()) ? "tru e" : "false"); |
508 } | 508 } |
509 IntRect visualRect = list.visualRect(i); | |
510 stringBuilder.append(WTF::String::format(", visualRect: [%d,%d,%d,%d]", | |
wkorman
2016/06/30 22:25:55
Can we tweak to match the new toString() format so
chrishtr
2016/06/30 22:29:10
Done.
| |
511 visualRect.x(), visualRect.y(), | |
512 visualRect.width(), visualRect.height())); | |
509 stringBuilder.append('}'); | 513 stringBuilder.append('}'); |
510 } | 514 } |
511 return stringBuilder.toString(); | 515 return stringBuilder.toString(); |
512 } | 516 } |
513 | 517 |
514 void PaintController::showDebugData() const | 518 void PaintController::showDebugData() const |
515 { | 519 { |
516 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); | 520 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); |
517 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data()); | 521 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m _newDisplayItemList).utf8().data()); |
518 } | 522 } |
519 | 523 |
520 #endif // ifndef NDEBUG | 524 #endif // ifndef NDEBUG |
521 | 525 |
522 } // namespace blink | 526 } // namespace blink |
OLD | NEW |