Index: ui/compositor/layer.cc |
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
index 3e61d40b95a2c02151bf44dd5418c2d74cc655c8..34c11e3f7482729acd4225ead015b8a08ecefacd 100644 |
--- a/ui/compositor/layer.cc |
+++ b/ui/compositor/layer.cc |
@@ -751,11 +751,11 @@ void Layer::PaintContents( |
delegate_->OnPaintLayer(PaintContext(canvas.get(), clip)); |
} |
-void Layer::PaintContentsToDisplayList( |
- cc::DisplayItemList* display_list, |
+scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
const gfx::Rect& clip, |
ContentLayerClient::PaintingControlSetting painting_control) { |
TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
+ scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create(); |
if (delegate_) { |
// TODO(danakj): Save the invalidation on the layer and pass that down |
// instead of the |clip| here. That will break everything until View |
@@ -763,8 +763,9 @@ void Layer::PaintContentsToDisplayList( |
gfx::Rect invalidation = clip; |
DCHECK(clip.Contains(invalidation)); |
delegate_->OnPaintLayer( |
- PaintContext(display_list, device_scale_factor_, clip, invalidation)); |
+ PaintContext(list.get(), device_scale_factor_, clip, invalidation)); |
} |
+ return list; |
} |
bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |