Add git cl format presubmit warning for extension and apps.
[chromium-blink-merge.git] / cc / debug / rasterize_and_record_benchmark_impl.h
blob0f9de9ba4f437969a874d27ea17748d75b92c5e3
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_
8 #include <map>
9 #include <utility>
10 #include <vector>
12 #include "base/time/time.h"
13 #include "cc/debug/micro_benchmark_impl.h"
15 namespace cc {
17 class LayerTreeHostImpl;
18 class PictureLayerImpl;
19 class LayerImpl;
20 class RasterizeAndRecordBenchmarkImpl : public MicroBenchmarkImpl {
21 public:
22 explicit RasterizeAndRecordBenchmarkImpl(
23 scoped_refptr<base::MessageLoopProxy> origin_loop,
24 base::Value* value,
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;
32 private:
33 void Run(LayerImpl* layer);
35 struct RasterizeResults {
36 RasterizeResults();
37 ~RasterizeResults();
39 int pixels_rasterized;
40 base::TimeDelta total_best_time;
43 RasterizeResults rasterize_results_;
44 int rasterize_repeat_count_;
47 } // namespace cc
49 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_