| Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| index a1e7a60bb2c7a0a2e8d4bf3e4be6c7ad0239d559..694762a2d4c9fb177976e472e52d8c3908d1f1c2 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| @@ -13,6 +13,28 @@
|
| #endif
|
|
|
| namespace blink {
|
| +
|
| +DisplayItem& DisplayItemList::AppendByMoving(DisplayItem& item) {
|
| +#ifndef NDEBUG
|
| + String original_debug_string = item.AsDebugString();
|
| +#endif
|
| + DCHECK(item.HasValidClient());
|
| + DisplayItem& result =
|
| + ContiguousContainer::AppendByMoving(item, item.DerivedSize());
|
| + // ContiguousContainer::appendByMoving() calls an in-place constructor
|
| + // on item which replaces it with a tombstone/"dead display item" that
|
| + // can be safely destructed but should never be used.
|
| + DCHECK(!item.HasValidClient());
|
| +#ifndef NDEBUG
|
| + // Save original debug string in the old item to help debugging.
|
| + item.SetClientDebugString(original_debug_string);
|
| +#endif
|
| + return result;
|
| +}
|
| +
|
| +void DisplayItemList::AppendVisualRect(const IntRect& visual_rect) {
|
| + visual_rects_.push_back(visual_rect);
|
| +}
|
|
|
| DisplayItemList::Range<DisplayItemList::iterator>
|
| DisplayItemList::ItemsInPaintChunk(const PaintChunk& paint_chunk) {
|
| @@ -76,9 +98,14 @@
|
| }
|
| #endif
|
| }
|
| -
|
| - json->SetString("visualRect", display_item.VisualRect().ToString());
|
| -
|
| + if (HasVisualRect(i)) {
|
| + IntRect local_visual_rect = VisualRect(i);
|
| + json->SetString(
|
| + "visualRect",
|
| + String::Format("[%d,%d %dx%d]", local_visual_rect.X(),
|
| + local_visual_rect.Y(), local_visual_rect.Width(),
|
| + local_visual_rect.Height()));
|
| + }
|
| json_array->PushObject(std::move(json));
|
| }
|
| return json_array;
|
|
|