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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 1521373005: Revert of cc: Shrink size of display item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/test/solid_color_content_layer_client.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_masks.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index f913d51a8002815e0624ae72d5260defcf831267..c8b587587e81261c5de610946c076c700cc72a3b 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -58,8 +58,12 @@
scoped_refptr<DisplayItemList> display_list =
DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings());
- display_list->CreateAndAppendItem<DrawingDisplayItem>(
- PaintableRegion(), skia::AdoptRef(recorder.endRecordingAsPicture()));
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion());
+
+ skia::RefPtr<SkPicture> picture =
+ skia::AdoptRef(recorder.endRecordingAsPicture());
+ item->SetNew(std::move(picture));
display_list->Finalize();
return display_list;
@@ -333,8 +337,12 @@
scoped_refptr<DisplayItemList> display_list =
DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings());
- display_list->CreateAndAppendItem<DrawingDisplayItem>(
- PaintableRegion(), skia::AdoptRef(recorder.endRecordingAsPicture()));
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion());
+
+ skia::RefPtr<SkPicture> picture =
+ skia::AdoptRef(recorder.endRecordingAsPicture());
+ item->SetNew(std::move(picture));
display_list->Finalize();
return display_list;
@@ -371,8 +379,11 @@
scoped_refptr<DisplayItemList> display_list =
DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings());
- display_list->CreateAndAppendItem<DrawingDisplayItem>(
- PaintableRegion(), skia::AdoptRef(recorder.endRecordingAsPicture()));
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion());
+ skia::RefPtr<SkPicture> picture =
+ skia::AdoptRef(recorder.endRecordingAsPicture());
+ item->SetNew(std::move(picture));
display_list->Finalize();
return display_list;
« no previous file with comments | « cc/test/solid_color_content_layer_client.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698