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_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
12 #include "base/time/time.h"
13 #include "cc/debug/micro_benchmark_impl.h"
17 class LayerTreeHostImpl
;
18 class PictureLayerImpl
;
20 class RasterizeAndRecordBenchmarkImpl
: public MicroBenchmarkImpl
{
22 explicit RasterizeAndRecordBenchmarkImpl(
23 scoped_refptr
<base::MessageLoopProxy
> origin_loop
,
25 const MicroBenchmarkImpl::DoneCallback
& callback
);
26 virtual ~RasterizeAndRecordBenchmarkImpl();
28 // Implements MicroBenchmark interface.
29 virtual void DidCompleteCommit(LayerTreeHostImpl
* host
) OVERRIDE
;
30 virtual void RunOnLayer(PictureLayerImpl
* layer
) OVERRIDE
;
33 void Run(LayerImpl
* layer
);
35 struct RasterizeResults
{
39 int pixels_rasterized
;
40 base::TimeDelta total_best_time
;
43 RasterizeResults rasterize_results_
;
44 int rasterize_repeat_count_
;
49 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_