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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 if (force_render_surface_ == force) | 738 if (force_render_surface_ == force) |
739 return; | 739 return; |
740 | 740 |
741 force_render_surface_ = force; | 741 force_render_surface_ = force; |
742 cc_layer_->SetForceRenderSurface(force_render_surface_); | 742 cc_layer_->SetForceRenderSurface(force_render_surface_); |
743 } | 743 } |
744 | 744 |
745 class LayerDebugInfo : public base::debug::ConvertableToTraceFormat { | 745 class LayerDebugInfo : public base::debug::ConvertableToTraceFormat { |
746 public: | 746 public: |
747 explicit LayerDebugInfo(std::string name) : name_(name) { } | 747 explicit LayerDebugInfo(std::string name) : name_(name) { } |
748 virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE { | 748 virtual void AppendAsTraceFormat(std::string* out) const override { |
749 base::DictionaryValue dictionary; | 749 base::DictionaryValue dictionary; |
750 dictionary.SetString("layer_name", name_); | 750 dictionary.SetString("layer_name", name_); |
751 base::JSONWriter::Write(&dictionary, out); | 751 base::JSONWriter::Write(&dictionary, out); |
752 } | 752 } |
753 | 753 |
754 private: | 754 private: |
755 virtual ~LayerDebugInfo() { } | 755 virtual ~LayerDebugInfo() { } |
756 std::string name_; | 756 std::string name_; |
757 }; | 757 }; |
758 | 758 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 children_.end(), | 1044 children_.end(), |
1045 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1045 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
1046 collection)); | 1046 collection)); |
1047 } | 1047 } |
1048 | 1048 |
1049 bool Layer::IsAnimating() const { | 1049 bool Layer::IsAnimating() const { |
1050 return animator_.get() && animator_->is_animating(); | 1050 return animator_.get() && animator_->is_animating(); |
1051 } | 1051 } |
1052 | 1052 |
1053 } // namespace ui | 1053 } // namespace ui |
OLD | NEW |