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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
11 #include "base/atomic_sequence_num.h" 11 #include "base/atomic_sequence_num.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/debug/trace_event.h" 14 #include "base/debug/trace_event.h"
15 #include "base/debug/trace_event_argument.h"
15 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
17 #include "base/stl_util.h" 18 #include "base/stl_util.h"
18 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
19 #include "cc/animation/animation_registrar.h" 20 #include "cc/animation/animation_registrar.h"
20 #include "cc/animation/layer_animation_controller.h" 21 #include "cc/animation/layer_animation_controller.h"
21 #include "cc/base/math_util.h" 22 #include "cc/base/math_util.h"
22 #include "cc/debug/devtools_instrumentation.h" 23 #include "cc/debug/devtools_instrumentation.h"
23 #include "cc/debug/rendering_stats_instrumentation.h" 24 #include "cc/debug/rendering_stats_instrumentation.h"
24 #include "cc/input/layer_selection_bound.h" 25 #include "cc/input/layer_selection_bound.h"
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // Top controls are only used in threaded mode. 1147 // Top controls are only used in threaded mode.
1147 proxy_->ImplThreadTaskRunner()->PostTask( 1148 proxy_->ImplThreadTaskRunner()->PostTask(
1148 FROM_HERE, 1149 FROM_HERE,
1149 base::Bind(&TopControlsManager::UpdateTopControlsState, 1150 base::Bind(&TopControlsManager::UpdateTopControlsState,
1150 top_controls_manager_weak_ptr_, 1151 top_controls_manager_weak_ptr_,
1151 constraints, 1152 constraints,
1152 current, 1153 current,
1153 animate)); 1154 animate));
1154 } 1155 }
1155 1156
1156 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { 1157 void LayerTreeHost::AsValueInto(base::debug::TracedValue* state) const {
1157 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1158 state->BeginDictionary("proxy");
1158 state->Set("proxy", proxy_->AsValue().release()); 1159 proxy_->AsValueInto(state);
1159 return state.PassAs<base::Value>(); 1160 state->EndDictionary();
1160 } 1161 }
1161 1162
1162 void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) { 1163 void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) {
1163 if (!settings_.accelerated_animation_enabled || 1164 if (!settings_.accelerated_animation_enabled ||
1164 animation_registrar_->active_animation_controllers().empty()) 1165 animation_registrar_->active_animation_controllers().empty())
1165 return; 1166 return;
1166 1167
1167 TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers"); 1168 TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers");
1168 1169
1169 AnimationRegistrar::AnimationControllerMap copy = 1170 AnimationRegistrar::AnimationControllerMap copy =
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 swap_promise_list_.push_back(swap_promise.Pass()); 1285 swap_promise_list_.push_back(swap_promise.Pass());
1285 } 1286 }
1286 1287
1287 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1288 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1288 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1289 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1289 swap_promise_list_[i]->DidNotSwap(reason); 1290 swap_promise_list_[i]->DidNotSwap(reason);
1290 swap_promise_list_.clear(); 1291 swap_promise_list_.clear();
1291 } 1292 }
1292 1293
1293 } // namespace cc 1294 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698