summaryrefslogtreecommitdiffstats
path: root/cc/debug/unittest_only_benchmark_impl.cc
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-18 00:39:33 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-18 00:39:33 +0000
commit5e5648a485b255d82e1e28912d5f32189d442605 (patch)
tree2c37711d934c1ff4d02fbd49c66afebfdb0b1191 /cc/debug/unittest_only_benchmark_impl.cc
parent9b4b393f4600baacf1afbf8f5f66096732c219ff (diff)
downloadchromium_src-5e5648a485b255d82e1e28912d5f32189d442605.zip
chromium_src-5e5648a485b255d82e1e28912d5f32189d442605.tar.gz
chromium_src-5e5648a485b255d82e1e28912d5f32189d442605.tar.bz2
cc: Plumbing for impl thread micro benchmarks
This patch adds plumbing for running micro benchmarks on the impl thread. The concept is as follows: - Create a main thread benchmark via gpu benchmarking extension - On commit complete, if the benchmark provides an impl thread benchmark, it is created and scheduled to be run on the impl thread - Impl thread benchmarks are run after an appropriate callback - Impl thread benchmarks post a done callback (with results) that is run on the main thread - The main thread benchmark gets the callback and posts its own done callback (with aggregated results) - This gets back to the gpu benchmarking extension which sends the response back to the caller R=enne@chromium.org, nduca@chromium.org Review URL: https://codereview.chromium.org/67563002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug/unittest_only_benchmark_impl.cc')
-rw-r--r--cc/debug/unittest_only_benchmark_impl.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/cc/debug/unittest_only_benchmark_impl.cc b/cc/debug/unittest_only_benchmark_impl.cc
new file mode 100644
index 0000000..b249ce3
--- /dev/null
+++ b/cc/debug/unittest_only_benchmark_impl.cc
@@ -0,0 +1,24 @@
+// Copyright 2013 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/unittest_only_benchmark_impl.h"
+
+#include "base/message_loop/message_loop_proxy.h"
+#include "base/values.h"
+
+namespace cc {
+
+UnittestOnlyBenchmarkImpl::UnittestOnlyBenchmarkImpl(
+ scoped_refptr<base::MessageLoopProxy> origin_loop,
+ base::Value* settings,
+ const DoneCallback& callback)
+ : MicroBenchmarkImpl(callback, origin_loop) {}
+
+UnittestOnlyBenchmarkImpl::~UnittestOnlyBenchmarkImpl() {}
+
+void UnittestOnlyBenchmarkImpl::DidCompleteCommit(LayerTreeHostImpl* host) {
+ NotifyDone(scoped_ptr<base::Value>());
+}
+
+} // namespace cc