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.
5 #ifndef CC_DEBUG_MICRO_BENCHMARK_H_
6 #define CC_DEBUG_MICRO_BENCHMARK_H_
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
20 class MicroBenchmark
{
22 typedef base::Callback
<void(scoped_ptr
<base::Value
>)> DoneCallback
;
24 explicit MicroBenchmark(const DoneCallback
& callback
);
25 virtual ~MicroBenchmark();
28 virtual void DidUpdateLayers(LayerTreeHost
* host
);
30 virtual void RunOnLayer(Layer
* layer
);
31 virtual void RunOnLayer(PictureLayer
* layer
);
34 void NotifyDone(scoped_ptr
<base::Value
> result
);
37 DoneCallback callback_
;
43 #endif // CC_DEBUG_MICRO_BENCHMARK_H_