| 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 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 json->SetString( | 86 json->SetString( |
| 87 "clientDebugName", | 87 "clientDebugName", |
| 88 String::Format("clientDebugName: \"%s\"", | 88 String::Format("clientDebugName: \"%s\"", |
| 89 display_item.Client().DebugName().Ascii().data())); | 89 display_item.Client().DebugName().Ascii().data())); |
| 90 } | 90 } |
| 91 #ifndef NDEBUG | 91 #ifndef NDEBUG |
| 92 if ((options & kShowPaintRecords) && display_item.IsDrawing()) { | 92 if ((options & kShowPaintRecords) && display_item.IsDrawing()) { |
| 93 const DrawingDisplayItem& item = | 93 const DrawingDisplayItem& item = |
| 94 static_cast<const DrawingDisplayItem&>(display_item); | 94 static_cast<const DrawingDisplayItem&>(display_item); |
| 95 if (const PaintRecord* record = item.GetPaintRecord().get()) { | 95 if (const PaintRecord* record = item.GetPaintRecord().get()) { |
| 96 json->SetString("record", RecordAsDebugString(record)); | 96 json->SetString("record", RecordAsDebugString( |
| 97 record, item.GetPaintRecordBounds())); |
| 97 } | 98 } |
| 98 } | 99 } |
| 99 #endif | 100 #endif |
| 100 } | 101 } |
| 101 if (HasVisualRect(i)) { | 102 if (HasVisualRect(i)) { |
| 102 IntRect local_visual_rect = VisualRect(i); | 103 IntRect local_visual_rect = VisualRect(i); |
| 103 json->SetString( | 104 json->SetString( |
| 104 "visualRect", | 105 "visualRect", |
| 105 String::Format("[%d,%d %dx%d]", local_visual_rect.X(), | 106 String::Format("[%d,%d %dx%d]", local_visual_rect.X(), |
| 106 local_visual_rect.Y(), local_visual_rect.Width(), | 107 local_visual_rect.Y(), local_visual_rect.Width(), |
| 107 local_visual_rect.Height())); | 108 local_visual_rect.Height())); |
| 108 } | 109 } |
| 109 json_array->PushObject(std::move(json)); | 110 json_array->PushObject(std::move(json)); |
| 110 } | 111 } |
| 111 return json_array; | 112 return json_array; |
| 112 } | 113 } |
| 113 | 114 |
| 114 } // namespace blink | 115 } // namespace blink |
| OLD | NEW |