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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 void Layer::SetForceRenderSurface(bool force) { | 801 void Layer::SetForceRenderSurface(bool force) { |
802 if (force_render_surface_ == force) | 802 if (force_render_surface_ == force) |
803 return; | 803 return; |
804 | 804 |
805 force_render_surface_ = force; | 805 force_render_surface_ = force; |
806 cc_layer_->SetForceRenderSurface(force_render_surface_); | 806 cc_layer_->SetForceRenderSurface(force_render_surface_); |
807 } | 807 } |
808 | 808 |
809 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { | 809 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { |
810 public: | 810 public: |
811 explicit LayerDebugInfo(std::string name) : name_(name) { } | 811 explicit LayerDebugInfo(const std::string& name) : name_(name) {} |
812 void AppendAsTraceFormat(std::string* out) const override { | 812 void AppendAsTraceFormat(std::string* out) const override { |
813 base::DictionaryValue dictionary; | 813 base::DictionaryValue dictionary; |
814 dictionary.SetString("layer_name", name_); | 814 dictionary.SetString("layer_name", name_); |
815 base::JSONWriter::Write(dictionary, out); | 815 base::JSONWriter::Write(dictionary, out); |
816 } | 816 } |
817 | 817 |
818 private: | 818 private: |
819 ~LayerDebugInfo() override {} | 819 ~LayerDebugInfo() override {} |
820 std::string name_; | 820 std::string name_; |
821 }; | 821 }; |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 children_.end(), | 1106 children_.end(), |
1107 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1107 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
1108 collection)); | 1108 collection)); |
1109 } | 1109 } |
1110 | 1110 |
1111 bool Layer::IsAnimating() const { | 1111 bool Layer::IsAnimating() const { |
1112 return animator_.get() && animator_->is_animating(); | 1112 return animator_.get() && animator_->is_animating(); |
1113 } | 1113 } |
1114 | 1114 |
1115 } // namespace ui | 1115 } // namespace ui |
OLD | NEW |