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

Unified Diff: cc/layers/picture_image_layer.cc

Issue 1123983002: cc: Use a ListContainer for DisplayItemList to reduce allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displaylistcontainer: fixdcheck Created 5 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer.cc
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index 2d338f00cb4d9a095330ae7febb4d4d1accbce86..71bdb44e9ea089d1c62d8b9c3f845cf717b826ac 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -73,7 +73,8 @@ void PictureImageLayer::PaintContentsToDisplayList(
skia::RefPtr<SkPicture> picture =
skia::AdoptRef(recorder.endRecordingAsPicture());
- display_list->AppendItem(DrawingDisplayItem::Create(picture));
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>();
+ item->SetNew(picture.Pass());
}
bool PictureImageLayer::FillsBoundsCompletely() const {
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698