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

Side by Side Diff: cc/debug/micro_benchmark.cc

Issue 67563002: cc: Plumbing for impl thread micro benchmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/debug/micro_benchmark.h" 5 #include "cc/debug/micro_benchmark.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/debug/micro_benchmark_impl.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
13 MicroBenchmark::MicroBenchmark(const DoneCallback& callback) 14 MicroBenchmark::MicroBenchmark(const DoneCallback& callback)
14 : callback_(callback), is_done_(false) {} 15 : callback_(callback), is_done_(false) {}
15 16
16 MicroBenchmark::~MicroBenchmark() {} 17 MicroBenchmark::~MicroBenchmark() {}
17 18
18 bool MicroBenchmark::IsDone() const { 19 bool MicroBenchmark::IsDone() const {
19 return is_done_; 20 return is_done_;
20 } 21 }
21 22
22 void MicroBenchmark::DidUpdateLayers(LayerTreeHost* host) {} 23 void MicroBenchmark::DidUpdateLayers(LayerTreeHost* host) {}
23 24
24 void MicroBenchmark::NotifyDone(scoped_ptr<base::Value> result) { 25 void MicroBenchmark::NotifyDone(scoped_ptr<base::Value> result) {
25 callback_.Run(result.Pass()); 26 callback_.Run(result.Pass());
26 is_done_ = true; 27 is_done_ = true;
27 } 28 }
28 29
29 void MicroBenchmark::RunOnLayer(Layer* layer) {} 30 void MicroBenchmark::RunOnLayer(Layer* layer) {}
30 31
31 void MicroBenchmark::RunOnLayer(PictureLayer* layer) {} 32 void MicroBenchmark::RunOnLayer(PictureLayer* layer) {}
32 33
34 scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
35 scoped_refptr<base::MessageLoopProxy> origin_loop) {
36 return make_scoped_ptr<MicroBenchmarkImpl>(NULL);
37 }
38
33 } // namespace cc 39 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698