Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: cc/debug/rasterize_and_record_benchmark_impl.h

Issue 66213007: cc: Add rasterize and record micro benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tile grid accessor Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
7
8 #include <map>
9 #include <utility>
10 #include <vector>
11
12 #include "base/time/time.h"
13 #include "cc/debug/micro_benchmark_impl.h"
14
15 namespace cc {
16
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();
27
28 // Implements MicroBenchmark interface.
29 virtual void DidCompleteCommit(LayerTreeHostImpl* host) OVERRIDE;
30 virtual void RunOnLayer(PictureLayerImpl* layer) OVERRIDE;
31
32 private:
33 void Run(LayerImpl* layer);
34
35 struct RasterizeResults {
36 RasterizeResults();
37 ~RasterizeResults();
38
39 int pixels_rasterized;
40 base::TimeDelta total_best_time;
41 };
42
43 RasterizeResults rasterize_results_;
44 int rasterize_repeat_count_;
45 };
46
47 } // namespace cc
48
49 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
OLDNEW
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698