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

Unified Diff: cc/debug/unittest_only_benchmark.cc

Issue 300963004: cc: Add message passing mechanism to micro benchmarking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/debug/unittest_only_benchmark.cc
diff --git a/cc/debug/unittest_only_benchmark.cc b/cc/debug/unittest_only_benchmark.cc
index 9c6b17699e312c2bffe9408ab94e9fb79a60540a..0f0694ad9df3e25f01b4bb7e880eebc69b1968d6 100644
--- a/cc/debug/unittest_only_benchmark.cc
+++ b/cc/debug/unittest_only_benchmark.cc
@@ -36,6 +36,18 @@ void UnittestOnlyBenchmark::DidUpdateLayers(LayerTreeHost* host) {
NotifyDone(scoped_ptr<base::Value>());
}
+bool UnittestOnlyBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
+ base::DictionaryValue* message = NULL;
+ value->GetAsDictionary(&message);
+ bool can_handle;
+ if (message->HasKey("can_handle")) {
+ message->GetBoolean("can_handle", &can_handle);
+ if (can_handle)
+ return true;
+ }
+ return false;
+}
+
void UnittestOnlyBenchmark::RecordImplResults(scoped_ptr<base::Value> results) {
NotifyDone(results.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698