Index: ui/compositor/layer.cc |
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
index 3a2aa4fc0a72a329c02ea4b51ec4eb194a146bce..12fd95727e62356d4ef331a9f34906fb6a270c0a 100644 |
--- a/ui/compositor/layer.cc |
+++ b/ui/compositor/layer.cc |
@@ -919,8 +919,10 @@ scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
paint_region_.Clear(); |
auto display_list = make_scoped_refptr(new cc::DisplayItemList); |
if (delegate_) { |
- delegate_->OnPaintLayer( |
- PaintContext(display_list.get(), device_scale_factor_, invalidation)); |
+ display_list->set_pixel_canvas_enabled(ui::IsPixelCanvasRecordingEnabled()); |
+ PaintContext context(display_list.get(), device_scale_factor_, invalidation, |
+ size()); |
+ delegate_->OnPaintLayer(context); |
} |
display_list->Finalize(); |
// TODO(domlaskowski): Move mirror invalidation to Layer::SchedulePaint. |