OLD | NEW |
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 |
OLD | NEW |