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

Side by Side Diff: bench/RectanizerBench.cpp

Issue 347823004: Remove Sk prefix from some bench classes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkGMBench -> GMBench Created 6 years, 6 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 | « bench/RectBench.cpp ('k') | bench/RectoriBench.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 2014 Google Inc. 2 * Copyright 2014 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 #include "SkBenchmark.h" 8 #include "Benchmark.h"
9 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkSize.h" 10 #include "SkSize.h"
11 #include "SkTDArray.h" 11 #include "SkTDArray.h"
12 12
13 #if SK_SUPPORT_GPU 13 #if SK_SUPPORT_GPU
14 14
15 #include "GrRectanizer_pow2.h" 15 #include "GrRectanizer_pow2.h"
16 #include "GrRectanizer_skyline.h" 16 #include "GrRectanizer_skyline.h"
17 17
18 /** 18 /**
19 * This bench exercises Ganesh' GrRectanizer classes. It exercises the following 19 * This bench exercises Ganesh' GrRectanizer classes. It exercises the following
20 * rectanizers: 20 * rectanizers:
21 * Pow2 Rectanizer 21 * Pow2 Rectanizer
22 * Skyline Rectanizer 22 * Skyline Rectanizer
23 * in the following cases: 23 * in the following cases:
24 * random rects (e.g., pull-save-layers forward use case) 24 * random rects (e.g., pull-save-layers forward use case)
25 * random power of two rects 25 * random power of two rects
26 * small constant sized power of 2 rects (e.g., glyph cache use case) 26 * small constant sized power of 2 rects (e.g., glyph cache use case)
27 */ 27 */
28 class RectanizerBench : public SkBenchmark { 28 class RectanizerBench : public Benchmark {
29 public: 29 public:
30 static const int kWidth = 1024; 30 static const int kWidth = 1024;
31 static const int kHeight = 1024; 31 static const int kHeight = 1024;
32 32
33 enum RectanizerType { 33 enum RectanizerType {
34 kPow2_RectanizerType, 34 kPow2_RectanizerType,
35 kSkyline_RectanizerType, 35 kSkyline_RectanizerType,
36 }; 36 };
37 37
38 enum RectType { 38 enum RectType {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 fRectanizer->reset(); 111 fRectanizer->reset();
112 } 112 }
113 113
114 private: 114 private:
115 SkString fName; 115 SkString fName;
116 RectanizerType fRectanizerType; 116 RectanizerType fRectanizerType;
117 RectType fRectType; 117 RectType fRectType;
118 SkAutoTDelete<GrRectanizer> fRectanizer; 118 SkAutoTDelete<GrRectanizer> fRectanizer;
119 119
120 typedef SkBenchmark INHERITED; 120 typedef Benchmark INHERITED;
121 }; 121 };
122 122
123 ////////////////////////////////////////////////////////////////////////////// 123 //////////////////////////////////////////////////////////////////////////////
124 124
125 DEF_BENCH(return new RectanizerBench(RectanizerBench::kPow2_RectanizerType, 125 DEF_BENCH(return new RectanizerBench(RectanizerBench::kPow2_RectanizerType,
126 RectanizerBench::kRand_RectType);) 126 RectanizerBench::kRand_RectType);)
127 DEF_BENCH(return new RectanizerBench(RectanizerBench::kPow2_RectanizerType, 127 DEF_BENCH(return new RectanizerBench(RectanizerBench::kPow2_RectanizerType,
128 RectanizerBench::kRandPow2_RectType);) 128 RectanizerBench::kRandPow2_RectType);)
129 DEF_BENCH(return new RectanizerBench(RectanizerBench::kPow2_RectanizerType, 129 DEF_BENCH(return new RectanizerBench(RectanizerBench::kPow2_RectanizerType,
130 RectanizerBench::kSmallPow2_RectType);) 130 RectanizerBench::kSmallPow2_RectType);)
131 DEF_BENCH(return new RectanizerBench(RectanizerBench::kSkyline_RectanizerType, 131 DEF_BENCH(return new RectanizerBench(RectanizerBench::kSkyline_RectanizerType,
132 RectanizerBench::kRand_RectType);) 132 RectanizerBench::kRand_RectType);)
133 DEF_BENCH(return new RectanizerBench(RectanizerBench::kSkyline_RectanizerType, 133 DEF_BENCH(return new RectanizerBench(RectanizerBench::kSkyline_RectanizerType,
134 RectanizerBench::kRandPow2_RectType);) 134 RectanizerBench::kRandPow2_RectType);)
135 DEF_BENCH(return new RectanizerBench(RectanizerBench::kSkyline_RectanizerType, 135 DEF_BENCH(return new RectanizerBench(RectanizerBench::kSkyline_RectanizerType,
136 RectanizerBench::kSmallPow2_RectType);) 136 RectanizerBench::kSmallPow2_RectType);)
137 137
138 #endif 138 #endif
OLDNEW
« no previous file with comments | « bench/RectBench.cpp ('k') | bench/RectoriBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698