Index: ui/compositor/paint_cache.cc |
diff --git a/ui/compositor/paint_cache.cc b/ui/compositor/paint_cache.cc |
index b4db1ab3b4cd7fd41d892570901d4b5d2e8e0bec..a44fc0a80cde3ecc81d57b307f8881195dc5be41 100644 |
--- a/ui/compositor/paint_cache.cc |
+++ b/ui/compositor/paint_cache.cc |
@@ -21,14 +21,13 @@ bool PaintCache::UseCache(const PaintContext& context, |
return false; |
DCHECK(context.list_); |
gfx::Rect bounds_in_layer = context.ToLayerSpaceBounds(size_in_layer); |
- auto* item = context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>( |
- bounds_in_layer); |
- display_item_.CloneTo(item); |
+ context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds_in_layer, |
+ display_item_); |
return true; |
} |
-void PaintCache::SetCache(const cc::DrawingDisplayItem* item) { |
- item->CloneTo(&display_item_); |
+void PaintCache::SetCache(const cc::DrawingDisplayItem& item) { |
+ item.CloneTo(&display_item_); |
has_cache_ = true; |
} |