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

Unified Diff: ui/compositor/layer.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: nits Created 3 years, 6 months 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
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.

Powered by Google App Engine
This is Rietveld 408576698