| 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( | 768 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
| 769 ContentLayerClient::PaintingControlSetting painting_control) { | 769 ContentLayerClient::PaintingControlSetting painting_control) { |
| 770 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); | 770 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
| 771 gfx::Rect local_bounds(bounds().size()); | 771 gfx::Rect local_bounds(bounds().size()); |
| 772 gfx::Rect invalidation( | 772 gfx::Rect invalidation( |
| 773 gfx::IntersectRects(paint_region_.bounds(), local_bounds)); | 773 gfx::IntersectRects(paint_region_.bounds(), local_bounds)); |
| 774 paint_region_.Clear(); | 774 paint_region_.Clear(); |
| 775 cc::DisplayItemListSettings settings; | 775 cc::DisplayItemListSettings settings; |
| 776 settings.use_cached_picture = false; | 776 settings.use_cached_picture = false; |
| 777 scoped_refptr<cc::DisplayItemList> display_list = | 777 scoped_refptr<cc::DisplayItemList> display_list = |
| 778 cc::DisplayItemList::Create(PaintableRegion(), settings); | 778 cc::DisplayItemList::Create(settings); |
| 779 if (delegate_) { | 779 if (delegate_) { |
| 780 delegate_->OnPaintLayer( | 780 delegate_->OnPaintLayer( |
| 781 PaintContext(display_list.get(), device_scale_factor_, invalidation)); | 781 PaintContext(display_list.get(), device_scale_factor_, invalidation)); |
| 782 } | 782 } |
| 783 display_list->Finalize(); | 783 display_list->Finalize(); |
| 784 return display_list; | 784 return display_list; |
| 785 } | 785 } |
| 786 | 786 |
| 787 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 787 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 788 | 788 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 if (animator_) { | 1067 if (animator_) { |
| 1068 animator_->ResetCompositor(compositor); | 1068 animator_->ResetCompositor(compositor); |
| 1069 animator_->RemoveFromCollection(collection); | 1069 animator_->RemoveFromCollection(collection); |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 for (auto* child : children_) | 1072 for (auto* child : children_) |
| 1073 child->ResetCompositorForAnimatorsInTree(compositor); | 1073 child->ResetCompositorForAnimatorsInTree(compositor); |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 } // namespace ui | 1076 } // namespace ui |
| OLD | NEW |