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

Side by Side Diff: tools/PictureBenchmark.h

Issue 1416913003: Clean up some dead code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill dump-record Created 5 years, 2 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 | « tools/CopyTilesRenderer.cpp ('k') | tools/PictureBenchmark.cpp » ('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 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef PictureBenchmark_DEFINED
9 #define PictureBenchmark_DEFINED
10
11 #include "PictureRenderer.h"
12 #include "PictureResultsWriter.h"
13 #include "SkTypes.h"
14 #include "TimerData.h"
15
16 class SkPicture;
17 class Timer;
18
19 namespace sk_tools {
20
21 class PictureBenchmark {
22 public:
23 PictureBenchmark();
24
25 ~PictureBenchmark();
26
27 /**
28 * Draw the provided SkPicture fRepeats times while collecting timing data, and log the output
29 * via fWriter.
30 */
31 void run(SkPicture* pict, bool useMultiPictureDraw);
32
33 void setRepeats(int repeats) {
34 fRepeats = repeats;
35 }
36
37 /**
38 * If true, tells run to log separate timing data for each individual tile. Each tile will be
39 * drawn fRepeats times. Requires the PictureRenderer set by setRenderer to be a
40 * TiledPictureRenderer.
41 */
42 void setTimeIndividualTiles(bool indiv) { fTimeIndividualTiles = indiv; }
43 bool timeIndividualTiles() const { return fTimeIndividualTiles; }
44
45 void setPurgeDecodedTex(bool purgeDecodedTex) { fPurgeDecodedTex = purgeDeco dedTex; }
46 bool purgeDecodedText() const { return fPurgeDecodedTex; }
47
48 PictureRenderer* setRenderer(PictureRenderer*);
49 PictureRenderer* renderer() { return fRenderer; }
50
51 void setTimerResultType(TimerData::Result resultType) { fTimerResult = resul tType; }
52
53 void setTimersToShow(bool wall, bool truncatedWall, bool cpu, bool truncated Cpu, bool gpu);
54
55 void setWriter(PictureResultsWriter* writer) { fWriter = writer; }
56
57 private:
58 int fRepeats;
59 PictureRenderer* fRenderer;
60 TimerData::Result fTimerResult;
61 uint32_t fTimerTypes; // bitfield of TimerData::TimerFlags values
62 bool fTimeIndividualTiles;
63 bool fPurgeDecodedTex;
64
65 PictureResultsWriter* fWriter;
66
67 Timer* setupTimer(bool useGLTimer = true);
68 };
69
70 }
71
72 #endif // PictureBenchmark_DEFINED
OLDNEW
« no previous file with comments | « tools/CopyTilesRenderer.cpp ('k') | tools/PictureBenchmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698