| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( | 754 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
| 755 ContentLayerClient::PaintingControlSetting painting_control) { | 755 ContentLayerClient::PaintingControlSetting painting_control) { |
| 756 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); | 756 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
| 757 gfx::Rect local_bounds(bounds().size()); | 757 gfx::Rect local_bounds(bounds().size()); |
| 758 gfx::Rect invalidation( | 758 gfx::Rect invalidation( |
| 759 gfx::IntersectRects(paint_region_.bounds(), local_bounds)); | 759 gfx::IntersectRects(paint_region_.bounds(), local_bounds)); |
| 760 paint_region_.Clear(); | 760 paint_region_.Clear(); |
| 761 cc::DisplayItemListSettings settings; | 761 cc::DisplayItemListSettings settings; |
| 762 settings.use_cached_picture = false; | 762 settings.use_cached_picture = false; |
| 763 scoped_refptr<cc::DisplayItemList> display_list = | 763 scoped_refptr<cc::DisplayItemList> display_list = |
| 764 cc::DisplayItemList::Create(PaintableRegion(), settings); | 764 cc::DisplayItemList::Create(settings); |
| 765 if (delegate_) { | 765 if (delegate_) { |
| 766 delegate_->OnPaintLayer( | 766 delegate_->OnPaintLayer( |
| 767 PaintContext(display_list.get(), device_scale_factor_, invalidation)); | 767 PaintContext(display_list.get(), device_scale_factor_, invalidation)); |
| 768 } | 768 } |
| 769 display_list->Finalize(); | 769 display_list->Finalize(); |
| 770 return display_list; | 770 return display_list; |
| 771 } | 771 } |
| 772 | 772 |
| 773 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 773 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 774 | 774 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 if (animator_) { | 1049 if (animator_) { |
| 1050 animator_->ResetCompositor(compositor); | 1050 animator_->ResetCompositor(compositor); |
| 1051 animator_->RemoveFromCollection(collection); | 1051 animator_->RemoveFromCollection(collection); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 for (auto* child : children_) | 1054 for (auto* child : children_) |
| 1055 child->ResetCompositorForAnimatorsInTree(compositor); | 1055 child->ResetCompositorForAnimatorsInTree(compositor); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 } // namespace ui | 1058 } // namespace ui |
| OLD | NEW |