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

Unified Diff: cc/playback/display_item_list.cc

Issue 2743793002: cc: Optimize GenerateDiscardableImagesMetadata for display items. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_item_list.cc
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index 8591c37b9528ab120d68b6305f72eca805d3558c..779fc81dded3996fc1042c0387435244971bd3f3 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -247,7 +247,9 @@ void DisplayItemList::GenerateDiscardableImagesMetadata() {
gfx::Rect bounds = rtree_.GetBounds();
DiscardableImageMap::ScopedMetadataGenerator generator(
&image_map_, gfx::Size(bounds.right(), bounds.bottom()));
- Raster(generator.canvas(), nullptr, gfx::Rect(), 1.f);
+ auto* canvas = generator.canvas();
+ for (const auto& item : inputs_.items)
+ item.Raster(canvas, nullptr);
}
void DisplayItemList::GetDiscardableImagesInRect(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698