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

Side by Side Diff: cc/animation/animation.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix builds 2 Created 7 years, 9 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 | « base/test/trace_event_analyzer_unittest.cc ('k') | cc/base/worker_pool.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/animation/animation.h" 5 #include "cc/animation/animation.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 char state_buffer[256]; 118 char state_buffer[256];
119 base::snprintf(state_buffer, 119 base::snprintf(state_buffer,
120 sizeof(state_buffer), 120 sizeof(state_buffer),
121 "%s->%s", 121 "%s->%s",
122 old_run_state_name, 122 old_run_state_name,
123 new_run_state_name); 123 new_run_state_name);
124 124
125 TRACE_EVENT_INSTANT2("cc", 125 TRACE_EVENT_INSTANT2("cc",
126 "LayerAnimationController::SetRunState", 126 "LayerAnimationController::SetRunState",
127 TRACE_EVENT_SCOPE_THREAD,
127 "Name", 128 "Name",
128 TRACE_STR_COPY(name_buffer), 129 TRACE_STR_COPY(name_buffer),
129 "State", 130 "State",
130 TRACE_STR_COPY(state_buffer)); 131 TRACE_STR_COPY(state_buffer));
131 } 132 }
132 133
133 void Animation::Suspend(double monotonic_time) { 134 void Animation::Suspend(double monotonic_time) {
134 SetRunState(Paused, monotonic_time); 135 SetRunState(Paused, monotonic_time);
135 suspended_ = true; 136 suspended_ = true;
136 } 137 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // the main thread. 228 // the main thread.
228 if (run_state_ == Animation::Paused || 229 if (run_state_ == Animation::Paused ||
229 other->run_state_ == Animation::Paused) { 230 other->run_state_ == Animation::Paused) {
230 other->run_state_ = run_state_; 231 other->run_state_ = run_state_;
231 other->pause_time_ = pause_time_; 232 other->pause_time_ = pause_time_;
232 other->total_paused_time_ = total_paused_time_; 233 other->total_paused_time_ = total_paused_time_;
233 } 234 }
234 } 235 }
235 236
236 } // namespace cc 237 } // namespace cc
OLDNEW
« no previous file with comments | « base/test/trace_event_analyzer_unittest.cc ('k') | cc/base/worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698