Index: ui/compositor/paint_cache.cc |
diff --git a/ui/compositor/paint_cache.cc b/ui/compositor/paint_cache.cc |
index ba3855ad307fac2b1edcac03ea986b6cad4e36c7..e9de88d188b4f6ec1c387cfc8f113a0a29c9cc82 100644 |
--- a/ui/compositor/paint_cache.cc |
+++ b/ui/compositor/paint_cache.cc |
@@ -21,13 +21,14 @@ |
return false; |
DCHECK(context.list_); |
gfx::Rect bounds_in_layer = context.ToLayerSpaceBounds(size_in_context); |
- context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds_in_layer, |
- display_item_); |
+ auto* item = context.list_->CreateAndAppendItem<cc::DrawingDisplayItem>( |
+ bounds_in_layer); |
+ display_item_.CloneTo(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; |
} |