OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_DEBUG_MICRO_BENCHMARK_IMPL_H_ |
| 6 #define CC_DEBUG_MICRO_BENCHMARK_IMPL_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 |
| 11 namespace base { |
| 12 class Value; |
| 13 class MessageLoopProxy; |
| 14 } // namespace base |
| 15 |
| 16 namespace cc { |
| 17 |
| 18 class LayerTreeHostImpl; |
| 19 class LayerImpl; |
| 20 class PictureLayerImpl; |
| 21 class MicroBenchmarkImpl { |
| 22 public: |
| 23 typedef base::Callback<void(scoped_ptr<base::Value>)> DoneCallback; |
| 24 |
| 25 explicit MicroBenchmarkImpl( |
| 26 const DoneCallback& callback, |
| 27 scoped_refptr<base::MessageLoopProxy> origin_loop); |
| 28 virtual ~MicroBenchmarkImpl(); |
| 29 |
| 30 bool IsDone() const; |
| 31 virtual void DidCompleteCommit(LayerTreeHostImpl* host); |
| 32 |
| 33 virtual void RunOnLayer(LayerImpl* layer); |
| 34 virtual void RunOnLayer(PictureLayerImpl* layer); |
| 35 |
| 36 protected: |
| 37 void NotifyDone(scoped_ptr<base::Value> result); |
| 38 |
| 39 private: |
| 40 DoneCallback callback_; |
| 41 bool is_done_; |
| 42 scoped_refptr<base::MessageLoopProxy> origin_loop_; |
| 43 }; |
| 44 |
| 45 } // namespace cc |
| 46 |
| 47 #endif // CC_DEBUG_MICRO_BENCHMARK_IMPL_H_ |
OLD | NEW |