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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 base::DictionaryValue dictionary; | 805 base::DictionaryValue dictionary; |
806 dictionary.SetString("layer_name", name_); | 806 dictionary.SetString("layer_name", name_); |
807 base::JSONWriter::Write(dictionary, out); | 807 base::JSONWriter::Write(dictionary, out); |
808 } | 808 } |
809 | 809 |
810 private: | 810 private: |
811 ~LayerDebugInfo() override {} | 811 ~LayerDebugInfo() override {} |
812 std::string name_; | 812 std::string name_; |
813 }; | 813 }; |
814 | 814 |
815 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 815 scoped_refptr<base::trace_event::ConvertableToTraceFormat> Layer::TakeDebugInfo( |
816 Layer::TakeDebugInfo() { | 816 cc::Layer* layer) { |
817 return new LayerDebugInfo(name_); | 817 return new LayerDebugInfo(name_); |
818 } | 818 } |
819 | 819 |
820 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { | 820 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { |
821 if (animator_.get()) | 821 if (animator_.get()) |
822 animator_->OnThreadedAnimationStarted(event); | 822 animator_->OnThreadedAnimationStarted(event); |
823 } | 823 } |
824 | 824 |
825 void Layer::CollectAnimators( | 825 void Layer::CollectAnimators( |
826 std::vector<scoped_refptr<LayerAnimator>>* animators) { | 826 std::vector<scoped_refptr<LayerAnimator>>* animators) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 animator_->RemoveFromCollection(collection); | 1074 animator_->RemoveFromCollection(collection); |
1075 for (auto* child : children_) | 1075 for (auto* child : children_) |
1076 child->RemoveAnimatorsInTreeFromCollection(collection); | 1076 child->RemoveAnimatorsInTreeFromCollection(collection); |
1077 } | 1077 } |
1078 | 1078 |
1079 bool Layer::IsAnimating() const { | 1079 bool Layer::IsAnimating() const { |
1080 return animator_.get() && animator_->is_animating(); | 1080 return animator_.get() && animator_->is_animating(); |
1081 } | 1081 } |
1082 | 1082 |
1083 } // namespace ui | 1083 } // namespace ui |
OLD | NEW |