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

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

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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 | « sync/tools/sync_client.cc ('k') | ui/events/latency_info.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/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
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
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
OLDNEW
« no previous file with comments | « sync/tools/sync_client.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698