| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 force_render_surface_ = force; | 789 force_render_surface_ = force; |
| 790 cc_layer_->SetForceRenderSurface(force_render_surface_); | 790 cc_layer_->SetForceRenderSurface(force_render_surface_); |
| 791 } | 791 } |
| 792 | 792 |
| 793 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { | 793 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat { |
| 794 public: | 794 public: |
| 795 explicit LayerDebugInfo(std::string name) : name_(name) { } | 795 explicit LayerDebugInfo(std::string name) : name_(name) { } |
| 796 void AppendAsTraceFormat(std::string* out) const override { | 796 void AppendAsTraceFormat(std::string* out) const override { |
| 797 base::DictionaryValue dictionary; | 797 base::DictionaryValue dictionary; |
| 798 dictionary.SetString("layer_name", name_); | 798 dictionary.SetString("layer_name", name_); |
| 799 base::JSONWriter::Write(&dictionary, out); | 799 base::JSONWriter::Write(dictionary, out); |
| 800 } | 800 } |
| 801 | 801 |
| 802 private: | 802 private: |
| 803 ~LayerDebugInfo() override {} | 803 ~LayerDebugInfo() override {} |
| 804 std::string name_; | 804 std::string name_; |
| 805 }; | 805 }; |
| 806 | 806 |
| 807 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 807 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
| 808 Layer::TakeDebugInfo() { | 808 Layer::TakeDebugInfo() { |
| 809 return new LayerDebugInfo(name_); | 809 return new LayerDebugInfo(name_); |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 children_.end(), | 1093 children_.end(), |
| 1094 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), | 1094 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), |
| 1095 collection)); | 1095 collection)); |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 bool Layer::IsAnimating() const { | 1098 bool Layer::IsAnimating() const { |
| 1099 return animator_.get() && animator_->is_animating(); | 1099 return animator_.get() && animator_->is_animating(); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 } // namespace ui | 1102 } // namespace ui |
| OLD | NEW |