#ifndef CC_DEBUG_PICTURE_RECORD_BENCHMARK_H_
#define CC_DEBUG_PICTURE_RECORD_BENCHMARK_H_
#include <map>
#include <utility>
#include <vector>
#include "base/time/time.h"
#include "cc/debug/micro_benchmark_controller.h"
namespace cc {
class LayerTreeHost;
class Layer;
class CC_EXPORT PictureRecordBenchmark : public MicroBenchmark {
public:
explicit PictureRecordBenchmark(scoped_ptr<base::Value> value,
const MicroBenchmark::DoneCallback& callback);
virtual ~PictureRecordBenchmark();
virtual void DidUpdateLayers(LayerTreeHost* host) OVERRIDE;
virtual void RunOnLayer(PictureLayer* layer) OVERRIDE;
private:
void Run(Layer* layer);
typedef std::pair<base::TimeDelta, unsigned> TotalTime;
std::map<std::pair<int, int>, TotalTime> times_;
std::vector<std::pair<int, int> > dimensions_;
};
}
#endif