| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( | 734 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
| 735 ContentLayerClient::PaintingControlSetting painting_control) { | 735 ContentLayerClient::PaintingControlSetting painting_control) { |
| 736 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); | 736 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
| 737 gfx::Rect local_bounds(bounds().size()); | 737 gfx::Rect local_bounds(bounds().size()); |
| 738 gfx::Rect invalidation( | 738 gfx::Rect invalidation( |
| 739 gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); | 739 gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); |
| 740 ClearDamagedRects(); | 740 ClearDamagedRects(); |
| 741 cc::DisplayItemListSettings settings; | 741 cc::DisplayItemListSettings settings; |
| 742 settings.use_cached_picture = false; | 742 settings.use_cached_picture = false; |
| 743 scoped_refptr<cc::DisplayItemList> display_list = | 743 scoped_refptr<cc::DisplayItemList> display_list = |
| 744 cc::DisplayItemList::Create(PaintableRegion(), settings); | 744 cc::DisplayItemList::Create(settings); |
| 745 if (delegate_) { | 745 if (delegate_) { |
| 746 delegate_->OnPaintLayer( | 746 delegate_->OnPaintLayer( |
| 747 PaintContext(display_list.get(), device_scale_factor_, invalidation)); | 747 PaintContext(display_list.get(), device_scale_factor_, invalidation)); |
| 748 } | 748 } |
| 749 display_list->Finalize(); | 749 display_list->Finalize(); |
| 750 return display_list; | 750 return display_list; |
| 751 } | 751 } |
| 752 | 752 |
| 753 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 753 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 754 | 754 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 if (animator_) { | 1025 if (animator_) { |
| 1026 animator_->ResetCompositor(compositor); | 1026 animator_->ResetCompositor(compositor); |
| 1027 animator_->RemoveFromCollection(collection); | 1027 animator_->RemoveFromCollection(collection); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 for (auto* child : children_) | 1030 for (auto* child : children_) |
| 1031 child->ResetCompositorForAnimatorsInTree(compositor); | 1031 child->ResetCompositorForAnimatorsInTree(compositor); |
| 1032 } | 1032 } |
| 1033 | 1033 |
| 1034 } // namespace ui | 1034 } // namespace ui |
| OLD | NEW |