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

Unified Diff: ui/compositor/layer.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Unittest update Created 3 years, 5 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 e4d00e84981709dfca106f92557c2c2fb7f45cc8..0ba661e1117fa2fb19bde4678642094318745b77 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -934,8 +934,11 @@ 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));
+ bool is_pixel_canvas = GetCompositor() ? GetCompositor()->is_pixel_canvas()
danakj 2017/07/25 17:58:56 A layer can't paint without being part of a compos
malaykeshav 2017/07/25 22:57:57 yes, but it does not work for layers set as mask.
+ : IsPixelCanvasRecordingEnabled();
+ delegate_->OnPaintLayer(PaintContext(display_list.get(),
+ device_scale_factor_, invalidation,
+ is_pixel_canvas));
}
display_list->Finalize();
// TODO(domlaskowski): Move mirror invalidation to Layer::SchedulePaint.

Powered by Google App Engine
This is Rietveld 408576698