| Index: ui/compositor/layer.cc | 
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc | 
| index 468789ae00f64bb7f64871499b96cdf62a696a50..49ff13b82d78eedd4bb51612f27e78169018eca6 100644 | 
| --- a/ui/compositor/layer.cc | 
| +++ b/ui/compositor/layer.cc | 
| @@ -40,6 +40,10 @@ | 
| namespace { | 
|  | 
| const ui::Layer* GetRoot(const ui::Layer* layer) { | 
| +  // Parent walk cannot be done on a layer that is being used as a mask. Get the | 
| +  // layer to which this layer is a mask of. | 
| +  if (layer->layer_mask_back_link()) | 
| +    layer = layer->layer_mask_back_link(); | 
| while (layer->parent()) | 
| layer = layer->parent(); | 
| return layer; | 
| @@ -933,8 +937,9 @@ 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)); | 
| +    delegate_->OnPaintLayer(PaintContext(display_list.get(), | 
| +                                         device_scale_factor_, invalidation, | 
| +                                         GetCompositor()->is_pixel_canvas())); | 
| } | 
| display_list->Finalize(); | 
| // TODO(domlaskowski): Move mirror invalidation to Layer::SchedulePaint. | 
|  |