OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
762 | 762 |
763 layer_tree_impl_->DidAnimateScrollOffset(); | 763 layer_tree_impl_->DidAnimateScrollOffset(); |
764 } | 764 } |
765 | 765 |
766 void LayerImpl::OnAnimationWaitingForDeletion() {} | 766 void LayerImpl::OnAnimationWaitingForDeletion() {} |
767 | 767 |
768 bool LayerImpl::IsActive() const { | 768 bool LayerImpl::IsActive() const { |
769 return layer_tree_impl_->IsActiveTree(); | 769 return layer_tree_impl_->IsActiveTree(); |
770 } | 770 } |
771 | 771 |
772 // TODO(wjmaclean) Convert so that bounds returns SizeF. | 772 // TODO(wjmaclean) Convert so that bounds returns SizeF. |
danakj
2014/08/20 17:00:25
OT: A SizeF is going to be terrible for layers tha
aelias_OOO_until_Jul13
2014/08/20 18:20:47
The more serious issue is that layer bounds lack p
| |
773 gfx::Size LayerImpl::bounds() const { | 773 gfx::Size LayerImpl::bounds() const { |
774 return ToFlooredSize(temporary_impl_bounds_); | 774 return ToCeiledSize(temporary_impl_bounds_); |
775 } | 775 } |
776 | 776 |
777 void LayerImpl::SetBounds(const gfx::Size& bounds) { | 777 void LayerImpl::SetBounds(const gfx::Size& bounds) { |
778 if (bounds_ == bounds) | 778 if (bounds_ == bounds) |
779 return; | 779 return; |
780 | 780 |
781 bounds_ = bounds; | 781 bounds_ = bounds; |
782 temporary_impl_bounds_ = bounds; | 782 temporary_impl_bounds_ = bounds; |
783 | 783 |
784 ScrollbarParametersDidChange(); | 784 ScrollbarParametersDidChange(); |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1535 } | 1535 } |
1536 | 1536 |
1537 void LayerImpl::NotifyAnimationFinished( | 1537 void LayerImpl::NotifyAnimationFinished( |
1538 base::TimeTicks monotonic_time, | 1538 base::TimeTicks monotonic_time, |
1539 Animation::TargetProperty target_property) { | 1539 Animation::TargetProperty target_property) { |
1540 if (target_property == Animation::ScrollOffset) | 1540 if (target_property == Animation::ScrollOffset) |
1541 layer_tree_impl_->InputScrollAnimationFinished(); | 1541 layer_tree_impl_->InputScrollAnimationFinished(); |
1542 } | 1542 } |
1543 | 1543 |
1544 } // namespace cc | 1544 } // namespace cc |
OLD | NEW |