Chromium Code Reviews| Index: ui/compositor/layer.cc |
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
| index e23e87fb63b223517a354fa7034eaab5a434ba61..f9ca6809f4dba4c0f906a61e5f97ce024d4e5345 100644 |
| --- a/ui/compositor/layer.cc |
| +++ b/ui/compositor/layer.cc |
| @@ -689,9 +689,8 @@ void Layer::SendDamagedRects() { |
| for (cc::Region::Iterator iter(damaged_region_); iter.has_rect(); iter.next()) |
| cc_layer_->SetNeedsDisplayRect(iter.rect()); |
| -} |
| -void Layer::ClearDamagedRects() { |
| + paint_region_.Union(damaged_region_); |
|
danakj
2016/05/31 19:53:15
Do you think we should union only when it's a pain
|
| damaged_region_.Clear(); |
| } |
| @@ -756,8 +755,8 @@ scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
| TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
| gfx::Rect local_bounds(bounds().size()); |
| gfx::Rect invalidation( |
| - gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); |
| - ClearDamagedRects(); |
| + gfx::IntersectRects(paint_region_.bounds(), local_bounds)); |
| + paint_region_.Clear(); |
| cc::DisplayItemListSettings settings; |
| settings.use_cached_picture = false; |
| scoped_refptr<cc::DisplayItemList> display_list = |