| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/DisplayItemList.h" | 5 #include "platform/graphics/paint/DisplayItemList.h" |
| 6 | 6 |
| 7 #include "platform/graphics/LoggingCanvas.h" | 7 #include "platform/graphics/LoggingCanvas.h" |
| 8 #include "platform/graphics/paint/DrawingDisplayItem.h" | 8 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 9 #include "platform/graphics/paint/PaintChunk.h" | 9 #include "platform/graphics/paint/PaintChunk.h" |
| 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 if (options & ShowClientDebugName) { | 85 if (options & ShowClientDebugName) { |
| 86 #endif | 86 #endif |
| 87 json->setString( | 87 json->setString( |
| 88 "clientDebugName", | 88 "clientDebugName", |
| 89 String::format("clientDebugName: \"%s\"", | 89 String::format("clientDebugName: \"%s\"", |
| 90 displayItem.client().debugName().ascii().data())); | 90 displayItem.client().debugName().ascii().data())); |
| 91 } | 91 } |
| 92 #ifndef NDEBUG | 92 #ifndef NDEBUG |
| 93 if ((options & ShowPaintRecords) && displayItem.isDrawing()) { | 93 if ((options & ShowPaintRecords) && displayItem.isDrawing()) { |
| 94 if (const PaintRecord* record = | 94 const DrawingDisplayItem& item = |
| 95 static_cast<const DrawingDisplayItem&>(displayItem) | 95 static_cast<const DrawingDisplayItem&>(displayItem); |
| 96 .GetPaintRecord()) { | 96 if (const PaintRecord* record = item.GetPaintRecord().get()) { |
| 97 json->setString("record", recordAsDebugString(record)); | 97 json->setString("record", recordAsDebugString(record)); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 #endif | 100 #endif |
| 101 } | 101 } |
| 102 if (hasVisualRect(i)) { | 102 if (hasVisualRect(i)) { |
| 103 IntRect localVisualRect = visualRect(i); | 103 IntRect localVisualRect = visualRect(i); |
| 104 json->setString( | 104 json->setString( |
| 105 "visualRect", | 105 "visualRect", |
| 106 String::format("[%d,%d %dx%d]", localVisualRect.x(), | 106 String::format("[%d,%d %dx%d]", localVisualRect.x(), |
| 107 localVisualRect.y(), localVisualRect.width(), | 107 localVisualRect.y(), localVisualRect.width(), |
| 108 localVisualRect.height())); | 108 localVisualRect.height())); |
| 109 } | 109 } |
| 110 jsonArray->pushObject(std::move(json)); | 110 jsonArray->pushObject(std::move(json)); |
| 111 } | 111 } |
| 112 return jsonArray; | 112 return jsonArray; |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace blink | 115 } // namespace blink |
| OLD | NEW |