OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "cc/debug/frame_timing_cost_tracker.h" |
| 6 |
| 7 namespace cc { |
| 8 |
| 9 FrameTimingCostTracker::FrameTimingCostTracker() { |
| 10 } |
| 11 |
| 12 FrameTimingCostTracker::~FrameTimingCostTracker() { |
| 13 } |
| 14 |
| 15 void FrameTimingCostTracker::Start(int source_frame_number) { |
| 16 worker_thread_cost_tracker_.set_source_frame_to_track(source_frame_number); |
| 17 } |
| 18 |
| 19 void FrameTimingCostTracker::Stop() { |
| 20 worker_thread_cost_tracker_.set_source_frame_to_track(0); |
| 21 } |
| 22 |
| 23 base::TimeDelta FrameTimingCostTracker::GetTotalCost() { |
| 24 return worker_thread_cost_tracker_.get_cost(); |
| 25 } |
| 26 |
| 27 void FrameTimingCostTracker::ResetCost() { |
| 28 worker_thread_cost_tracker_.reset_cost(); |
| 29 } |
| 30 |
| 31 WorkerThreadCostTracker* FrameTimingCostTracker::GetWorkerThreadCostTracker() { |
| 32 return &worker_thread_cost_tracker_; |
| 33 } |
| 34 |
| 35 } // namespace cc |
OLD | NEW |