Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp

Issue 2894093002: Don't access DisplayItemClient::VisualRect() for cached display items. (Closed)
Patch Set: - Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 694762a2d4c9fb177976e472e52d8c3908d1f1c2..a1e7a60bb2c7a0a2e8d4bf3e4be6c7ad0239d559 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -14,28 +14,6 @@
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) {
return Range<iterator>(begin() + paint_chunk.begin_index,
@@ -98,14 +76,9 @@ std::unique_ptr<JSONArray> DisplayItemList::SubsequenceAsJSON(
}
#endif
}
- 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->SetString("visualRect", display_item.VisualRect().ToString());
+
json_array->PushObject(std::move(json));
}
return json_array;

Powered by Google App Engine
This is Rietveld 408576698