rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2012 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | #include "SkBenchmark.h" |
| 10 | #include "SkCanvas.h" |
| 11 | #include "SkRTree.h" |
| 12 | #include "SkRandom.h" |
| 13 | #include "SkString.h" |
| 14 | |
| 15 | // confine rectangles to a smallish area, so queries generally hit something, and overlap occurs: |
| 16 | static const int GENERATE_EXTENTS = 1000; |
| 17 | static const int NUM_BUILD_RECTS = 500; |
| 18 | static const int NUM_QUERY_RECTS = 5000; |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 19 | static const int GRID_WIDTH = 100; |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 20 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 21 | typedef SkIRect (*MakeRectProc)(SkRandom&, int, int); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 22 | |
| 23 | // Time how long it takes to build an R-Tree either bulk-loaded or not |
| 24 | class BBoxBuildBench : public SkBenchmark { |
| 25 | public: |
| 26 | BBoxBuildBench(void* param, const char* name, MakeRectProc proc, bool bulkLoad, |
| 27 | SkBBoxHierarchy* tree) |
skia.committer@gmail.com | 6c77816 | 2012-09-06 02:01:13 +0000 | [diff] [blame] | 28 | : INHERITED(param) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 29 | , fTree(tree) |
| 30 | , fProc(proc) |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 31 | , fBulkLoad(bulkLoad) { |
| 32 | fName.append("rtree_"); |
| 33 | fName.append(name); |
| 34 | fName.append("_build"); |
| 35 | if (fBulkLoad) { |
| 36 | fName.append("_bulk"); |
| 37 | } |
tomhudson@google.com | 9dc2713 | 2012-09-13 15:50:24 +0000 | [diff] [blame] | 38 | fIsRendering = false; |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 39 | } |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 40 | virtual ~BBoxBuildBench() { |
rileya@google.com | 4813458 | 2012-09-11 15:41:50 +0000 | [diff] [blame] | 41 | fTree->unref(); |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 42 | } |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 43 | protected: |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 44 | virtual const char* onGetName() SK_OVERRIDE { |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 45 | return fName.c_str(); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 46 | } |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 47 | virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 48 | SkRandom rand; |
mtklein@google.com | c289743 | 2013-09-10 19:23:38 +0000 | [diff] [blame] | 49 | for (int i = 0; i < this->getLoops(); ++i) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 50 | for (int j = 0; j < NUM_BUILD_RECTS; ++j) { |
| 51 | fTree->insert(reinterpret_cast<void*>(j), fProc(rand, j, NUM_BUILD_RECTS), |
| 52 | fBulkLoad); |
| 53 | } |
| 54 | fTree->flushDeferredInserts(); |
| 55 | fTree->clear(); |
| 56 | } |
| 57 | } |
| 58 | private: |
| 59 | SkBBoxHierarchy* fTree; |
| 60 | MakeRectProc fProc; |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 61 | SkString fName; |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 62 | bool fBulkLoad; |
| 63 | typedef SkBenchmark INHERITED; |
| 64 | }; |
| 65 | |
| 66 | // Time how long it takes to perform queries on an R-Tree, bulk-loaded or not |
| 67 | class BBoxQueryBench : public SkBenchmark { |
| 68 | public: |
| 69 | enum QueryType { |
| 70 | kSmall_QueryType, // small queries |
| 71 | kLarge_QueryType, // large queries |
| 72 | kRandom_QueryType,// randomly sized queries |
| 73 | kFull_QueryType // queries that cover everything |
| 74 | }; |
| 75 | |
skia.committer@gmail.com | 6c77816 | 2012-09-06 02:01:13 +0000 | [diff] [blame] | 76 | BBoxQueryBench(void* param, const char* name, MakeRectProc proc, bool bulkLoad, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 77 | QueryType q, SkBBoxHierarchy* tree) |
skia.committer@gmail.com | 6c77816 | 2012-09-06 02:01:13 +0000 | [diff] [blame] | 78 | : INHERITED(param) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 79 | , fTree(tree) |
| 80 | , fProc(proc) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 81 | , fBulkLoad(bulkLoad) |
| 82 | , fQuery(q) { |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 83 | fName.append("rtree_"); |
| 84 | fName.append(name); |
| 85 | fName.append("_query"); |
| 86 | if (fBulkLoad) { |
| 87 | fName.append("_bulk"); |
| 88 | } |
tomhudson@google.com | 9dc2713 | 2012-09-13 15:50:24 +0000 | [diff] [blame] | 89 | fIsRendering = false; |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 90 | } |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 91 | virtual ~BBoxQueryBench() { |
rileya@google.com | 4813458 | 2012-09-11 15:41:50 +0000 | [diff] [blame] | 92 | fTree->unref(); |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 93 | } |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 94 | protected: |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 95 | virtual const char* onGetName() SK_OVERRIDE { |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 96 | return fName.c_str(); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 97 | } |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 98 | virtual void onPreDraw() SK_OVERRIDE { |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 99 | SkRandom rand; |
mtklein@google.com | c289743 | 2013-09-10 19:23:38 +0000 | [diff] [blame] | 100 | for (int j = 0; j < NUM_QUERY_RECTS; ++j) { |
| 101 | fTree->insert(reinterpret_cast<void*>(j), |
| 102 | fProc(rand, j, NUM_QUERY_RECTS), |
| 103 | fBulkLoad); |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 104 | } |
| 105 | fTree->flushDeferredInserts(); |
| 106 | } |
| 107 | |
| 108 | virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 109 | SkRandom rand; |
mtklein@google.com | c289743 | 2013-09-10 19:23:38 +0000 | [diff] [blame] | 110 | for (int i = 0; i < this->getLoops(); ++i) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 111 | SkTDArray<void*> hits; |
| 112 | SkIRect query; |
| 113 | switch(fQuery) { |
| 114 | case kSmall_QueryType: |
| 115 | query.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 116 | query.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 117 | query.fRight = query.fLeft + (GENERATE_EXTENTS / 20); |
| 118 | query.fBottom = query.fTop + (GENERATE_EXTENTS / 20); |
| 119 | break; |
| 120 | case kLarge_QueryType: |
| 121 | query.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 122 | query.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 123 | query.fRight = query.fLeft + (GENERATE_EXTENTS / 2); |
| 124 | query.fBottom = query.fTop + (GENERATE_EXTENTS / 2); |
| 125 | break; |
| 126 | case kFull_QueryType: |
| 127 | query.fLeft = -GENERATE_EXTENTS; |
| 128 | query.fTop = -GENERATE_EXTENTS; |
| 129 | query.fRight = 2 * GENERATE_EXTENTS; |
| 130 | query.fBottom = 2 * GENERATE_EXTENTS; |
| 131 | break; |
| 132 | default: // fallthrough |
| 133 | case kRandom_QueryType: |
| 134 | query.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 135 | query.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 136 | query.fRight = query.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 2); |
| 137 | query.fBottom = query.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 2); |
| 138 | break; |
| 139 | }; |
| 140 | fTree->search(query, &hits); |
| 141 | } |
| 142 | } |
| 143 | private: |
| 144 | SkBBoxHierarchy* fTree; |
| 145 | MakeRectProc fProc; |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 146 | SkString fName; |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 147 | bool fBulkLoad; |
| 148 | QueryType fQuery; |
| 149 | typedef SkBenchmark INHERITED; |
| 150 | }; |
| 151 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 152 | static inline SkIRect make_simple_rect(SkRandom&, int index, int numRects) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 153 | SkIRect out = {0, 0, GENERATE_EXTENTS, GENERATE_EXTENTS}; |
| 154 | return out; |
| 155 | } |
| 156 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 157 | static inline SkIRect make_concentric_rects_increasing(SkRandom&, int index, int numRects) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 158 | SkIRect out = {0, 0, index + 1, index + 1}; |
| 159 | return out; |
| 160 | } |
| 161 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 162 | static inline SkIRect make_concentric_rects_decreasing(SkRandom&, int index, int numRects) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 163 | SkIRect out = {0, 0, numRects - index, numRects - index}; |
| 164 | return out; |
| 165 | } |
| 166 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 167 | static inline SkIRect make_XYordered_rects(SkRandom& rand, int index, int numRects) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 168 | SkIRect out; |
| 169 | out.fLeft = index % GRID_WIDTH; |
| 170 | out.fTop = index / GRID_WIDTH; |
sglez@google.com | 0d60db6 | 2013-08-30 18:54:54 +0000 | [diff] [blame] | 171 | out.fRight = out.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
| 172 | out.fBottom = out.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 173 | return out; |
| 174 | } |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 175 | static inline SkIRect make_YXordered_rects(SkRandom& rand, int index, int numRects) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 176 | SkIRect out; |
| 177 | out.fLeft = index / GRID_WIDTH; |
| 178 | out.fTop = index % GRID_WIDTH; |
sglez@google.com | 0d60db6 | 2013-08-30 18:54:54 +0000 | [diff] [blame] | 179 | out.fRight = out.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
| 180 | out.fBottom = out.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 181 | return out; |
| 182 | } |
| 183 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 184 | static inline SkIRect make_point_rects(SkRandom& rand, int index, int numRects) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 185 | SkIRect out; |
| 186 | out.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 187 | out.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 188 | out.fRight = out.fLeft + (GENERATE_EXTENTS / 200); |
| 189 | out.fBottom = out.fTop + (GENERATE_EXTENTS / 200); |
| 190 | return out; |
| 191 | } |
| 192 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 193 | static inline SkIRect make_random_rects(SkRandom& rand, int index, int numRects) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 194 | SkIRect out; |
| 195 | out.fLeft = rand.nextS() % GENERATE_EXTENTS; |
| 196 | out.fTop = rand.nextS() % GENERATE_EXTENTS; |
| 197 | out.fRight = out.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 5); |
| 198 | out.fBottom = out.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 5); |
| 199 | return out; |
| 200 | } |
| 201 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 202 | static inline SkIRect make_large_rects(SkRandom& rand, int index, int numRects) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 203 | SkIRect out; |
| 204 | out.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 205 | out.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 206 | out.fRight = out.fLeft + (GENERATE_EXTENTS / 3); |
| 207 | out.fBottom = out.fTop + (GENERATE_EXTENTS / 3); |
| 208 | return out; |
| 209 | } |
| 210 | |
| 211 | /////////////////////////////////////////////////////////////////////////////// |
| 212 | |
humper@google.com | 05af1af | 2013-01-07 16:47:43 +0000 | [diff] [blame] | 213 | static inline SkBenchmark* Fact0(void* p) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 214 | return SkNEW_ARGS(BBoxBuildBench, (p, "XYordered", &make_XYordered_rects, false, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 215 | SkRTree::Create(5, 16))); |
| 216 | } |
humper@google.com | 05af1af | 2013-01-07 16:47:43 +0000 | [diff] [blame] | 217 | static inline SkBenchmark* Fact1(void* p) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 218 | return SkNEW_ARGS(BBoxBuildBench, (p, "XYordered", &make_XYordered_rects, true, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 219 | SkRTree::Create(5, 16))); |
| 220 | } |
humper@google.com | 05af1af | 2013-01-07 16:47:43 +0000 | [diff] [blame] | 221 | static inline SkBenchmark* Fact2(void* p) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 222 | return SkNEW_ARGS(BBoxBuildBench, (p, "(unsorted)XYordered", &make_XYordered_rects, true, |
| 223 | SkRTree::Create(5, 16, 1, false))); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 224 | } |
humper@google.com | 05af1af | 2013-01-07 16:47:43 +0000 | [diff] [blame] | 225 | static inline SkBenchmark* Fact3(void* p) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 226 | return SkNEW_ARGS(BBoxQueryBench, (p, "XYordered", &make_XYordered_rects, true, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 227 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
| 228 | } |
humper@google.com | 05af1af | 2013-01-07 16:47:43 +0000 | [diff] [blame] | 229 | static inline SkBenchmark* Fact4(void* p) { |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 230 | return SkNEW_ARGS(BBoxQueryBench, (p, "(unsorted)XYordered", &make_XYordered_rects, true, |
| 231 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 232 | } |
| 233 | |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 234 | static inline SkBenchmark* Fact5(void* p) { |
| 235 | return SkNEW_ARGS(BBoxBuildBench, (p, "YXordered", &make_YXordered_rects, false, |
| 236 | SkRTree::Create(5, 16))); |
| 237 | } |
| 238 | static inline SkBenchmark* Fact6(void* p) { |
| 239 | return SkNEW_ARGS(BBoxBuildBench, (p, "YXordered", &make_YXordered_rects, true, |
| 240 | SkRTree::Create(5, 16))); |
| 241 | } |
| 242 | static inline SkBenchmark* Fact7(void* p) { |
| 243 | return SkNEW_ARGS(BBoxBuildBench, (p, "(unsorted)YXordered", &make_YXordered_rects, true, |
| 244 | SkRTree::Create(5, 16, 1, false))); |
| 245 | } |
| 246 | static inline SkBenchmark* Fact8(void* p) { |
| 247 | return SkNEW_ARGS(BBoxQueryBench, (p, "YXordered", &make_YXordered_rects, true, |
| 248 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
| 249 | } |
| 250 | static inline SkBenchmark* Fact9(void* p) { |
| 251 | return SkNEW_ARGS(BBoxQueryBench, (p, "(unsorted)YXordered", &make_YXordered_rects, true, |
| 252 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
| 253 | } |
| 254 | |
| 255 | static inline SkBenchmark* Fact10(void* p) { |
| 256 | return SkNEW_ARGS(BBoxBuildBench, (p, "random", &make_random_rects, false, |
| 257 | SkRTree::Create(5, 16))); |
| 258 | } |
| 259 | static inline SkBenchmark* Fact11(void* p) { |
| 260 | return SkNEW_ARGS(BBoxBuildBench, (p, "random", &make_random_rects, true, |
| 261 | SkRTree::Create(5, 16))); |
| 262 | } |
| 263 | static inline SkBenchmark* Fact12(void* p) { |
| 264 | return SkNEW_ARGS(BBoxBuildBench, (p, "(unsorted)random", &make_random_rects, true, |
| 265 | SkRTree::Create(5, 16, 1, false))); |
| 266 | } |
| 267 | static inline SkBenchmark* Fact13(void* p) { |
| 268 | return SkNEW_ARGS(BBoxQueryBench, (p, "random", &make_random_rects, true, |
| 269 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
| 270 | } |
| 271 | static inline SkBenchmark* Fact14(void* p) { |
| 272 | return SkNEW_ARGS(BBoxQueryBench, (p, "(unsorted)random", &make_random_rects, true, |
| 273 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
| 274 | } |
| 275 | |
| 276 | static inline SkBenchmark* Fact15(void* p) { |
| 277 | return SkNEW_ARGS(BBoxBuildBench, (p, "concentric", |
| 278 | &make_concentric_rects_increasing, true, SkRTree::Create(5, 16))); |
| 279 | } |
| 280 | static inline SkBenchmark* Fact16(void* p) { |
| 281 | return SkNEW_ARGS(BBoxBuildBench, (p, "(unsorted)concentric", |
| 282 | &make_concentric_rects_increasing, true, SkRTree::Create(5, 16, 1, false))); |
| 283 | } |
| 284 | static inline SkBenchmark* Fact17(void* p) { |
| 285 | return SkNEW_ARGS(BBoxQueryBench, (p, "concentric", &make_concentric_rects_increasing, true, |
| 286 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
| 287 | } |
| 288 | static inline SkBenchmark* Fact18(void* p) { |
| 289 | return SkNEW_ARGS(BBoxQueryBench, (p, "(unsorted)concentric", &make_concentric_rects_increasing, true, |
| 290 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
| 291 | } |
| 292 | |
| 293 | static BenchRegistry gReg18(Fact18); |
| 294 | static BenchRegistry gReg17(Fact17); |
| 295 | static BenchRegistry gReg16(Fact16); |
| 296 | static BenchRegistry gReg15(Fact15); |
| 297 | static BenchRegistry gReg14(Fact14); |
| 298 | static BenchRegistry gReg13(Fact13); |
| 299 | static BenchRegistry gReg12(Fact12); |
| 300 | static BenchRegistry gReg11(Fact11); |
| 301 | static BenchRegistry gReg10(Fact10); |
| 302 | static BenchRegistry gReg9(Fact9); |
| 303 | static BenchRegistry gReg8(Fact8); |
| 304 | static BenchRegistry gReg7(Fact7); |
| 305 | static BenchRegistry gReg6(Fact6); |
| 306 | static BenchRegistry gReg5(Fact5); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 307 | static BenchRegistry gReg4(Fact4); |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 308 | static BenchRegistry gReg3(Fact3); |
| 309 | static BenchRegistry gReg2(Fact2); |
| 310 | static BenchRegistry gReg1(Fact1); |
| 311 | static BenchRegistry gReg0(Fact0); |