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

Side by Side Diff: cc/trees/layer_tree_host_impl.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 | « cc/debug/traced_picture.cc ('k') | chrome/browser/caps/generate_state_json.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 3104
3105 if (animation_registrar_->ActivateAnimations()) 3105 if (animation_registrar_->ActivateAnimations())
3106 SetNeedsAnimate(); 3106 SetNeedsAnimate();
3107 } 3107 }
3108 3108
3109 std::string LayerTreeHostImpl::LayerTreeAsJson() const { 3109 std::string LayerTreeHostImpl::LayerTreeAsJson() const {
3110 std::string str; 3110 std::string str;
3111 if (active_tree_->root_layer()) { 3111 if (active_tree_->root_layer()) {
3112 scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson()); 3112 scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson());
3113 base::JSONWriter::WriteWithOptions( 3113 base::JSONWriter::WriteWithOptions(
3114 json.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); 3114 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str);
3115 } 3115 }
3116 return str; 3116 return str;
3117 } 3117 }
3118 3118
3119 int LayerTreeHostImpl::SourceAnimationFrameNumber() const { 3119 int LayerTreeHostImpl::SourceAnimationFrameNumber() const {
3120 return fps_counter_->current_frame_number(); 3120 return fps_counter_->current_frame_number();
3121 } 3121 }
3122 3122
3123 void LayerTreeHostImpl::StartAnimatingScrollbarAnimationController( 3123 void LayerTreeHostImpl::StartAnimatingScrollbarAnimationController(
3124 ScrollbarAnimationController* controller) { 3124 ScrollbarAnimationController* controller) {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
3421 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3421 new_target.SetToMin(layer_impl->MaxScrollOffset());
3422 3422
3423 curve->UpdateTarget( 3423 curve->UpdateTarget(
3424 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3424 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3425 .InSecondsF(), 3425 .InSecondsF(),
3426 new_target); 3426 new_target);
3427 3427
3428 return true; 3428 return true;
3429 } 3429 }
3430 } // namespace cc 3430 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/traced_picture.cc ('k') | chrome/browser/caps/generate_state_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698