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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.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/PaintArtifact.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
index 119f912fc2ea589732da496d6ce7430194103a33..9bbbb122376cc3426ed5e492e311ba99400c9e56 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
@@ -117,14 +117,12 @@ void PaintArtifact::Replay(const FloatRect& bounds,
}
DISABLE_CFI_PERF
-void PaintArtifact::AppendToWebDisplayItemList(WebDisplayItemList* list) const {
+void PaintArtifact::AppendToWebDisplayItemList(
+ const LayoutSize& visual_rect_offset,
+ WebDisplayItemList* list) const {
TRACE_EVENT0("blink,benchmark", "PaintArtifact::appendToWebDisplayItemList");
- size_t visual_rect_index = 0;
- for (const DisplayItem& display_item : display_item_list_) {
- display_item.AppendToWebDisplayItemList(
- display_item_list_.VisualRect(visual_rect_index), list);
- visual_rect_index++;
- }
+ for (const DisplayItem& item : display_item_list_)
+ item.AppendToWebDisplayItemList(visual_rect_offset, list);
list->SetIsSuitableForGpuRasterization(IsSuitableForGpuRasterization());
}

Powered by Google App Engine
This is Rietveld 408576698