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

Side by Side Diff: tools/PictureBenchmark.h

Issue 639013003: Update old tools to allow MultiPictureDraw rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 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
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef PictureBenchmark_DEFINED 8 #ifndef PictureBenchmark_DEFINED
9 #define PictureBenchmark_DEFINED 9 #define PictureBenchmark_DEFINED
10 10
(...skipping 10 matching lines...) Expand all
21 class PictureBenchmark { 21 class PictureBenchmark {
22 public: 22 public:
23 PictureBenchmark(); 23 PictureBenchmark();
24 24
25 ~PictureBenchmark(); 25 ~PictureBenchmark();
26 26
27 /** 27 /**
28 * Draw the provided SkPicture fRepeats times while collecting timing data, and log the output 28 * Draw the provided SkPicture fRepeats times while collecting timing data, and log the output
29 * via fWriter. 29 * via fWriter.
30 */ 30 */
31 void run(SkPicture* pict); 31 void run(SkPicture* pict, bool useMultiPictureDraw);
32 32
33 void setRepeats(int repeats) { 33 void setRepeats(int repeats) {
34 fRepeats = repeats; 34 fRepeats = repeats;
35 } 35 }
36 36
37 /** 37 /**
38 * If true, tells run to log separate timing data for each individual tile. Each tile will be 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 39 * drawn fRepeats times. Requires the PictureRenderer set by setRenderer to be a
40 * TiledPictureRenderer. 40 * TiledPictureRenderer.
41 */ 41 */
42 void setTimeIndividualTiles(bool indiv) { fTimeIndividualTiles = indiv; } 42 void setTimeIndividualTiles(bool indiv) { fTimeIndividualTiles = indiv; }
43 bool timeIndividualTiles() const { return fTimeIndividualTiles; } 43 bool timeIndividualTiles() const { return fTimeIndividualTiles; }
44 44
45 void setPurgeDecodedTex(bool purgeDecodedTex) { fPurgeDecodedTex = purgeDeco dedTex; } 45 void setPurgeDecodedTex(bool purgeDecodedTex) { fPurgeDecodedTex = purgeDeco dedTex; }
46 bool purgeDecodedText() const { return fPurgeDecodedTex; } 46 bool purgeDecodedText() const { return fPurgeDecodedTex; }
47 47
48 void setPreprocess(bool preprocess) { fPreprocess = preprocess; }
49 bool preprocess() const { return fPreprocess; }
50
51 PictureRenderer* setRenderer(PictureRenderer*); 48 PictureRenderer* setRenderer(PictureRenderer*);
52 PictureRenderer* renderer() { return fRenderer; } 49 PictureRenderer* renderer() { return fRenderer; }
53 50
54 void setTimerResultType(TimerData::Result resultType) { fTimerResult = resul tType; } 51 void setTimerResultType(TimerData::Result resultType) { fTimerResult = resul tType; }
55 52
56 void setTimersToShow(bool wall, bool truncatedWall, bool cpu, bool truncated Cpu, bool gpu); 53 void setTimersToShow(bool wall, bool truncatedWall, bool cpu, bool truncated Cpu, bool gpu);
57 54
58 void setWriter(PictureResultsWriter* writer) { fWriter = writer; } 55 void setWriter(PictureResultsWriter* writer) { fWriter = writer; }
59 56
60 private: 57 private:
61 int fRepeats; 58 int fRepeats;
62 PictureRenderer* fRenderer; 59 PictureRenderer* fRenderer;
63 TimerData::Result fTimerResult; 60 TimerData::Result fTimerResult;
64 uint32_t fTimerTypes; // bitfield of TimerData::TimerFlags values 61 uint32_t fTimerTypes; // bitfield of TimerData::TimerFlags values
65 bool fTimeIndividualTiles; 62 bool fTimeIndividualTiles;
66 bool fPurgeDecodedTex; 63 bool fPurgeDecodedTex;
67 bool fPreprocess;
68 64
69 PictureResultsWriter* fWriter; 65 PictureResultsWriter* fWriter;
70 66
71 Timer* setupTimer(bool useGLTimer = true); 67 Timer* setupTimer(bool useGLTimer = true);
72 }; 68 };
73 69
74 } 70 }
75 71
76 #endif // PictureBenchmark_DEFINED 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