OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/resources/bitmap_tile_task_worker_pool.h" | 5 #include "cc/resources/bitmap_tile_task_worker_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 tasks_pending_[task_set] = false; | 184 tasks_pending_[task_set] = false; |
185 if (tasks_pending_.any()) { | 185 if (tasks_pending_.any()) { |
186 TRACE_EVENT_ASYNC_STEP_INTO1("cc", "ScheduledTasks", this, "running", | 186 TRACE_EVENT_ASYNC_STEP_INTO1("cc", "ScheduledTasks", this, "running", |
187 "state", StateAsValue()); | 187 "state", StateAsValue()); |
188 } else { | 188 } else { |
189 TRACE_EVENT_ASYNC_END0("cc", "ScheduledTasks", this); | 189 TRACE_EVENT_ASYNC_END0("cc", "ScheduledTasks", this); |
190 } | 190 } |
191 client_->DidFinishRunningTileTasks(task_set); | 191 client_->DidFinishRunningTileTasks(task_set); |
192 } | 192 } |
193 | 193 |
194 scoped_refptr<base::debug::ConvertableToTraceFormat> | 194 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
195 BitmapTileTaskWorkerPool::StateAsValue() const { | 195 BitmapTileTaskWorkerPool::StateAsValue() const { |
196 scoped_refptr<base::debug::TracedValue> state = | 196 scoped_refptr<base::trace_event::TracedValue> state = |
197 new base::debug::TracedValue(); | 197 new base::trace_event::TracedValue(); |
198 | 198 |
199 state->BeginArray("tasks_pending"); | 199 state->BeginArray("tasks_pending"); |
200 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) | 200 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) |
201 state->AppendBoolean(tasks_pending_[task_set]); | 201 state->AppendBoolean(tasks_pending_[task_set]); |
202 state->EndArray(); | 202 state->EndArray(); |
203 return state; | 203 return state; |
204 } | 204 } |
205 | 205 |
206 } // namespace cc | 206 } // namespace cc |
OLD | NEW |