Chromium Code Reviews| Index: ui/compositor/layer.cc |
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
| index 914e000feedff6be8b423b1b2aa44a573e3a6bc2..c54939939c9af2dfe211d3b16797a9e5acd9552d 100644 |
| --- a/ui/compositor/layer.cc |
| +++ b/ui/compositor/layer.cc |
| @@ -750,14 +750,12 @@ void Layer::PaintContentsToDisplayList( |
| const gfx::Rect& clip, |
| ContentLayerClient::PaintingControlSetting painting_control) { |
| TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
| + gfx::Rect invalidation = |
| + gfx::IntersectRects(damaged_region_.bounds(), bounds()); |
|
sky
2015/04/23 16:29:00
Isn't bounds() in the parent coordinate space and
danakj
2015/04/23 16:34:09
Ah, yes, thanks. I wish they said so in their name
|
| + DCHECK(clip.Contains(invalidation)); |
| ClearDamagedRects(); |
| if (!delegate_) |
| return; |
| - // TODO(danakj): Save the invalidation on the layer and pass that down |
| - // instead of the |clip| here. That will break everything until View |
| - // early-outs emit cached display items instead of nothing. |
| - gfx::Rect invalidation = clip; |
| - DCHECK(clip.Contains(invalidation)); |
| delegate_->OnPaintLayer( |
| PaintContext(display_list, device_scale_factor_, clip, invalidation)); |
| } |