Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1075)

Side by Side Diff: ui/compositor/layer.cc

Issue 868603007: Mechanical rename of base::debug -> base::trace_event [final pass]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3_1
Patch Set: Fixing win file. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 758 }
759 759
760 void Layer::SetForceRenderSurface(bool force) { 760 void Layer::SetForceRenderSurface(bool force) {
761 if (force_render_surface_ == force) 761 if (force_render_surface_ == force)
762 return; 762 return;
763 763
764 force_render_surface_ = force; 764 force_render_surface_ = force;
765 cc_layer_->SetForceRenderSurface(force_render_surface_); 765 cc_layer_->SetForceRenderSurface(force_render_surface_);
766 } 766 }
767 767
768 class LayerDebugInfo : public base::debug::ConvertableToTraceFormat { 768 class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat {
769 public: 769 public:
770 explicit LayerDebugInfo(std::string name) : name_(name) { } 770 explicit LayerDebugInfo(std::string name) : name_(name) { }
771 void AppendAsTraceFormat(std::string* out) const override { 771 void AppendAsTraceFormat(std::string* out) const override {
772 base::DictionaryValue dictionary; 772 base::DictionaryValue dictionary;
773 dictionary.SetString("layer_name", name_); 773 dictionary.SetString("layer_name", name_);
774 base::JSONWriter::Write(&dictionary, out); 774 base::JSONWriter::Write(&dictionary, out);
775 } 775 }
776 776
777 private: 777 private:
778 ~LayerDebugInfo() override {} 778 ~LayerDebugInfo() override {}
779 std::string name_; 779 std::string name_;
780 }; 780 };
781 781
782 scoped_refptr<base::debug::ConvertableToTraceFormat> Layer::TakeDebugInfo() { 782 scoped_refptr<base::trace_event::ConvertableToTraceFormat>
783 Layer::TakeDebugInfo() {
783 return new LayerDebugInfo(name_); 784 return new LayerDebugInfo(name_);
784 } 785 }
785 786
786 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { 787 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) {
787 if (animator_.get()) 788 if (animator_.get())
788 animator_->OnThreadedAnimationStarted(event); 789 animator_->OnThreadedAnimationStarted(event);
789 } 790 }
790 791
791 void Layer::CollectAnimators( 792 void Layer::CollectAnimators(
792 std::vector<scoped_refptr<LayerAnimator> >* animators) { 793 std::vector<scoped_refptr<LayerAnimator> >* animators) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 children_.end(), 1068 children_.end(),
1068 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), 1069 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection),
1069 collection)); 1070 collection));
1070 } 1071 }
1071 1072
1072 bool Layer::IsAnimating() const { 1073 bool Layer::IsAnimating() const {
1073 return animator_.get() && animator_->is_animating(); 1074 return animator_.get() && animator_->is_animating();
1074 } 1075 }
1075 1076
1076 } // namespace ui 1077 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698