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 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 DCHECK(delegated_renderer_layer_.get() || surface_layer_.get()); | 743 DCHECK(delegated_renderer_layer_.get() || surface_layer_.get()); |
744 if (!delegate_) | 744 if (!delegate_) |
745 return; | 745 return; |
746 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); | 746 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); |
747 } | 747 } |
748 | 748 |
749 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { | 749 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { |
750 cc_layer_->RequestCopyOfOutput(request.Pass()); | 750 cc_layer_->RequestCopyOfOutput(request.Pass()); |
751 } | 751 } |
752 | 752 |
| 753 gfx::Rect Layer::PaintableRegion() { |
| 754 return gfx::Rect(size()); |
| 755 } |
| 756 |
753 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( | 757 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( |
754 const gfx::Rect& clip, | 758 const gfx::Rect& clip, |
755 ContentLayerClient::PaintingControlSetting painting_control) { | 759 ContentLayerClient::PaintingControlSetting painting_control) { |
756 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); | 760 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); |
757 gfx::Rect local_bounds(bounds().size()); | 761 gfx::Rect local_bounds(bounds().size()); |
758 gfx::Rect invalidation( | 762 gfx::Rect invalidation( |
759 gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); | 763 gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); |
760 DCHECK(clip.Contains(invalidation)); | 764 DCHECK(clip.Contains(invalidation)); |
761 ClearDamagedRects(); | 765 ClearDamagedRects(); |
762 cc::DisplayItemListSettings settings; | 766 cc::DisplayItemListSettings settings; |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 animator_->RemoveFromCollection(collection); | 1078 animator_->RemoveFromCollection(collection); |
1075 for (auto* child : children_) | 1079 for (auto* child : children_) |
1076 child->RemoveAnimatorsInTreeFromCollection(collection); | 1080 child->RemoveAnimatorsInTreeFromCollection(collection); |
1077 } | 1081 } |
1078 | 1082 |
1079 bool Layer::IsAnimating() const { | 1083 bool Layer::IsAnimating() const { |
1080 return animator_.get() && animator_->is_animating(); | 1084 return animator_.get() && animator_->is_animating(); |
1081 } | 1085 } |
1082 | 1086 |
1083 } // namespace ui | 1087 } // namespace ui |
OLD | NEW |