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

Unified Diff: cc/debug/frame_timing_cost_tracker.cc

Issue 799863004: not for commit/review (thread cost tracker) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/debug/frame_timing_cost_tracker.h ('k') | cc/debug/worker_thread_cost_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/frame_timing_cost_tracker.cc
diff --git a/cc/debug/frame_timing_cost_tracker.cc b/cc/debug/frame_timing_cost_tracker.cc
new file mode 100644
index 0000000000000000000000000000000000000000..08fbd9ecf932bea6ead9cf4079509b8f1dccdde5
--- /dev/null
+++ b/cc/debug/frame_timing_cost_tracker.cc
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/debug/frame_timing_cost_tracker.h"
+
+namespace cc {
+
+FrameTimingCostTracker::FrameTimingCostTracker() {
+}
+
+FrameTimingCostTracker::~FrameTimingCostTracker() {
+}
+
+void FrameTimingCostTracker::Start(int source_frame_number) {
+ worker_thread_cost_tracker_.set_source_frame_to_track(source_frame_number);
+}
+
+void FrameTimingCostTracker::Stop() {
+ worker_thread_cost_tracker_.set_source_frame_to_track(0);
+}
+
+base::TimeDelta FrameTimingCostTracker::GetTotalCost() {
+ return worker_thread_cost_tracker_.get_cost();
+}
+
+void FrameTimingCostTracker::ResetCost() {
+ worker_thread_cost_tracker_.reset_cost();
+}
+
+WorkerThreadCostTracker* FrameTimingCostTracker::GetWorkerThreadCostTracker() {
+ return &worker_thread_cost_tracker_;
+}
+
+} // namespace cc
« no previous file with comments | « cc/debug/frame_timing_cost_tracker.h ('k') | cc/debug/worker_thread_cost_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698