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

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

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months 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
« no previous file with comments | « cc/debug/picture_record_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_
6 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_
7
8 #include <map>
9 #include <utility>
10 #include <vector>
11
12 #include "base/memory/weak_ptr.h"
13 #include "base/time/time.h"
14 #include "cc/debug/micro_benchmark_controller.h"
15 #include "cc/resources/picture.h"
16
17 namespace base {
18 class DictionaryValue;
19 }
20
21 namespace cc {
22
23 class LayerTreeHost;
24 class Layer;
25 class RasterizeAndRecordBenchmark : public MicroBenchmark {
26 public:
27 explicit RasterizeAndRecordBenchmark(
28 scoped_ptr<base::Value> value,
29 const MicroBenchmark::DoneCallback& callback);
30 ~RasterizeAndRecordBenchmark() override;
31
32 // Implements MicroBenchmark interface.
33 void DidUpdateLayers(LayerTreeHost* host) override;
34 void RunOnLayer(PictureLayer* layer) override;
35
36 scoped_ptr<MicroBenchmarkImpl> CreateBenchmarkImpl(
37 scoped_refptr<base::MessageLoopProxy> origin_loop) override;
38
39 private:
40 void RunOnDisplayListLayer(PictureLayer* layer,
41 const gfx::Rect& visible_content_rect);
42 void RunOnPictureLayer(PictureLayer* layer,
43 const gfx::Rect& visible_content_rect);
44
45 void RecordRasterResults(scoped_ptr<base::Value> results);
46
47 struct RecordResults {
48 RecordResults();
49 ~RecordResults();
50
51 int pixels_recorded;
52 size_t bytes_used;
53 base::TimeDelta total_best_time[RecordingSource::RECORDING_MODE_COUNT];
54 };
55
56 RecordResults record_results_;
57 int record_repeat_count_;
58 scoped_ptr<base::Value> settings_;
59 scoped_ptr<base::DictionaryValue> results_;
60
61 // The following is used in DCHECKs.
62 bool main_thread_benchmark_done_;
63
64 LayerTreeHost* host_;
65
66 base::WeakPtrFactory<RasterizeAndRecordBenchmark> weak_ptr_factory_;
67 };
68
69 } // namespace cc
70
71 #endif // CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_
OLDNEW
« no previous file with comments | « cc/debug/picture_record_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698