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: |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 26 | BBoxBuildBench(const char* name, MakeRectProc proc, bool bulkLoad, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 27 | SkBBoxHierarchy* tree) |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 28 | : fTree(tree) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 29 | , fProc(proc) |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 30 | , fBulkLoad(bulkLoad) { |
| 31 | fName.append("rtree_"); |
| 32 | fName.append(name); |
| 33 | fName.append("_build"); |
| 34 | if (fBulkLoad) { |
| 35 | fName.append("_bulk"); |
| 36 | } |
| 37 | } |
commit-bot@chromium.org | 644629c | 2013-11-21 06:21:58 +0000 | [diff] [blame] | 38 | |
| 39 | virtual bool isSuitableFor(Backend backend) SK_OVERRIDE { |
| 40 | return backend == kNonRendering_Backend; |
| 41 | } |
| 42 | |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 43 | virtual ~BBoxBuildBench() { |
rileya@google.com | 4813458 | 2012-09-11 15:41:50 +0000 | [diff] [blame] | 44 | fTree->unref(); |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 45 | } |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 46 | protected: |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 47 | virtual const char* onGetName() SK_OVERRIDE { |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 48 | return fName.c_str(); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 49 | } |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 50 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 51 | SkRandom rand; |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 52 | for (int i = 0; i < loops; ++i) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 53 | for (int j = 0; j < NUM_BUILD_RECTS; ++j) { |
| 54 | fTree->insert(reinterpret_cast<void*>(j), fProc(rand, j, NUM_BUILD_RECTS), |
| 55 | fBulkLoad); |
| 56 | } |
| 57 | fTree->flushDeferredInserts(); |
| 58 | fTree->clear(); |
| 59 | } |
| 60 | } |
| 61 | private: |
| 62 | SkBBoxHierarchy* fTree; |
| 63 | MakeRectProc fProc; |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 64 | SkString fName; |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 65 | bool fBulkLoad; |
| 66 | typedef SkBenchmark INHERITED; |
| 67 | }; |
| 68 | |
| 69 | // Time how long it takes to perform queries on an R-Tree, bulk-loaded or not |
| 70 | class BBoxQueryBench : public SkBenchmark { |
| 71 | public: |
| 72 | enum QueryType { |
| 73 | kSmall_QueryType, // small queries |
| 74 | kLarge_QueryType, // large queries |
| 75 | kRandom_QueryType,// randomly sized queries |
| 76 | kFull_QueryType // queries that cover everything |
| 77 | }; |
| 78 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 79 | BBoxQueryBench(const char* name, MakeRectProc proc, bool bulkLoad, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 80 | QueryType q, SkBBoxHierarchy* tree) |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 81 | : fTree(tree) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 82 | , fProc(proc) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 83 | , fBulkLoad(bulkLoad) |
| 84 | , fQuery(q) { |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 85 | fName.append("rtree_"); |
| 86 | fName.append(name); |
| 87 | fName.append("_query"); |
| 88 | if (fBulkLoad) { |
| 89 | fName.append("_bulk"); |
| 90 | } |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 91 | } |
commit-bot@chromium.org | 644629c | 2013-11-21 06:21:58 +0000 | [diff] [blame] | 92 | |
| 93 | virtual bool isSuitableFor(Backend backend) SK_OVERRIDE { |
| 94 | return backend == kNonRendering_Backend; |
| 95 | } |
| 96 | |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 97 | virtual ~BBoxQueryBench() { |
rileya@google.com | 4813458 | 2012-09-11 15:41:50 +0000 | [diff] [blame] | 98 | fTree->unref(); |
robertphillips@google.com | 07a05d5 | 2012-09-11 11:54:07 +0000 | [diff] [blame] | 99 | } |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 100 | protected: |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 101 | virtual const char* onGetName() SK_OVERRIDE { |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 102 | return fName.c_str(); |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 103 | } |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 104 | virtual void onPreDraw() SK_OVERRIDE { |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 105 | SkRandom rand; |
mtklein@google.com | c289743 | 2013-09-10 19:23:38 +0000 | [diff] [blame] | 106 | for (int j = 0; j < NUM_QUERY_RECTS; ++j) { |
| 107 | fTree->insert(reinterpret_cast<void*>(j), |
| 108 | fProc(rand, j, NUM_QUERY_RECTS), |
| 109 | fBulkLoad); |
commit-bot@chromium.org | 7fb83c8 | 2013-08-01 15:58:07 +0000 | [diff] [blame] | 110 | } |
| 111 | fTree->flushDeferredInserts(); |
| 112 | } |
| 113 | |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 114 | virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 115 | SkRandom rand; |
commit-bot@chromium.org | 3361471 | 2013-12-03 18:17:16 +0000 | [diff] [blame] | 116 | for (int i = 0; i < loops; ++i) { |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 117 | SkTDArray<void*> hits; |
| 118 | SkIRect query; |
| 119 | switch(fQuery) { |
| 120 | case kSmall_QueryType: |
| 121 | query.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 122 | query.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 123 | query.fRight = query.fLeft + (GENERATE_EXTENTS / 20); |
| 124 | query.fBottom = query.fTop + (GENERATE_EXTENTS / 20); |
| 125 | break; |
| 126 | case kLarge_QueryType: |
| 127 | query.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 128 | query.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 129 | query.fRight = query.fLeft + (GENERATE_EXTENTS / 2); |
| 130 | query.fBottom = query.fTop + (GENERATE_EXTENTS / 2); |
| 131 | break; |
| 132 | case kFull_QueryType: |
| 133 | query.fLeft = -GENERATE_EXTENTS; |
| 134 | query.fTop = -GENERATE_EXTENTS; |
| 135 | query.fRight = 2 * GENERATE_EXTENTS; |
| 136 | query.fBottom = 2 * GENERATE_EXTENTS; |
| 137 | break; |
| 138 | default: // fallthrough |
| 139 | case kRandom_QueryType: |
| 140 | query.fLeft = rand.nextU() % GENERATE_EXTENTS; |
| 141 | query.fTop = rand.nextU() % GENERATE_EXTENTS; |
| 142 | query.fRight = query.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 2); |
| 143 | query.fBottom = query.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 2); |
| 144 | break; |
| 145 | }; |
| 146 | fTree->search(query, &hits); |
| 147 | } |
| 148 | } |
| 149 | private: |
| 150 | SkBBoxHierarchy* fTree; |
| 151 | MakeRectProc fProc; |
rileya@google.com | 61348d1 | 2012-09-06 13:38:53 +0000 | [diff] [blame] | 152 | SkString fName; |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 153 | bool fBulkLoad; |
| 154 | QueryType fQuery; |
| 155 | typedef SkBenchmark INHERITED; |
| 156 | }; |
| 157 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 158 | 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] | 159 | SkIRect out = {0, 0, index + 1, index + 1}; |
| 160 | return out; |
| 161 | } |
| 162 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 163 | 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] | 164 | SkIRect out; |
| 165 | out.fLeft = index % GRID_WIDTH; |
| 166 | out.fTop = index / GRID_WIDTH; |
sglez@google.com | 0d60db6 | 2013-08-30 18:54:54 +0000 | [diff] [blame] | 167 | out.fRight = out.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
| 168 | out.fBottom = out.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 169 | return out; |
| 170 | } |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 171 | 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] | 172 | SkIRect out; |
| 173 | out.fLeft = index / GRID_WIDTH; |
| 174 | out.fTop = index % GRID_WIDTH; |
sglez@google.com | 0d60db6 | 2013-08-30 18:54:54 +0000 | [diff] [blame] | 175 | out.fRight = out.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
| 176 | out.fBottom = out.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 3); |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 177 | return out; |
| 178 | } |
| 179 | |
commit-bot@chromium.org | e0e7cfe | 2013-09-09 20:09:12 +0000 | [diff] [blame] | 180 | 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] | 181 | SkIRect out; |
| 182 | out.fLeft = rand.nextS() % GENERATE_EXTENTS; |
| 183 | out.fTop = rand.nextS() % GENERATE_EXTENTS; |
| 184 | out.fRight = out.fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 5); |
| 185 | out.fBottom = out.fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 5); |
| 186 | return out; |
| 187 | } |
| 188 | |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 189 | /////////////////////////////////////////////////////////////////////////////// |
| 190 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 191 | DEF_BENCH( |
| 192 | return SkNEW_ARGS(BBoxBuildBench, ("XYordered", &make_XYordered_rects, false, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 193 | SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 194 | ) |
| 195 | DEF_BENCH( |
| 196 | return SkNEW_ARGS(BBoxBuildBench, ("XYordered", &make_XYordered_rects, true, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 197 | SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 198 | ) |
| 199 | DEF_BENCH( |
| 200 | return SkNEW_ARGS(BBoxBuildBench, ("(unsorted)XYordered", &make_XYordered_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 201 | SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 202 | ) |
| 203 | DEF_BENCH( |
| 204 | return SkNEW_ARGS(BBoxQueryBench, ("XYordered", &make_XYordered_rects, true, |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 205 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 206 | ) |
| 207 | DEF_BENCH( |
| 208 | return SkNEW_ARGS(BBoxQueryBench, ("(unsorted)XYordered", &make_XYordered_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 209 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 210 | ) |
rileya@google.com | 981b33a | 2012-09-05 18:36:17 +0000 | [diff] [blame] | 211 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 212 | DEF_BENCH( |
| 213 | return SkNEW_ARGS(BBoxBuildBench, ("YXordered", &make_YXordered_rects, false, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 214 | SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 215 | ) |
| 216 | DEF_BENCH( |
| 217 | return SkNEW_ARGS(BBoxBuildBench, ("YXordered", &make_YXordered_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 218 | SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 219 | ) |
| 220 | DEF_BENCH( |
| 221 | return SkNEW_ARGS(BBoxBuildBench, ("(unsorted)YXordered", &make_YXordered_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 222 | SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 223 | ) |
| 224 | DEF_BENCH( |
| 225 | return SkNEW_ARGS(BBoxQueryBench, ("YXordered", &make_YXordered_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 226 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 227 | ) |
| 228 | DEF_BENCH( |
| 229 | return SkNEW_ARGS(BBoxQueryBench, ("(unsorted)YXordered", &make_YXordered_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 230 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 231 | ) |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 232 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 233 | DEF_BENCH( |
| 234 | return SkNEW_ARGS(BBoxBuildBench, ("random", &make_random_rects, false, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 235 | SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 236 | ) |
| 237 | DEF_BENCH( |
| 238 | return SkNEW_ARGS(BBoxBuildBench, ("random", &make_random_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 239 | SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 240 | ) |
| 241 | DEF_BENCH( |
| 242 | return SkNEW_ARGS(BBoxBuildBench, ("(unsorted)random", &make_random_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 243 | SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 244 | ) |
| 245 | DEF_BENCH( |
| 246 | return SkNEW_ARGS(BBoxQueryBench, ("random", &make_random_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 247 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 248 | ) |
| 249 | DEF_BENCH( |
| 250 | return SkNEW_ARGS(BBoxQueryBench, ("(unsorted)random", &make_random_rects, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 251 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 252 | ) |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 253 | |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 254 | DEF_BENCH( |
| 255 | return SkNEW_ARGS(BBoxBuildBench, ("concentric", |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 256 | &make_concentric_rects_increasing, true, SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 257 | ) |
| 258 | DEF_BENCH( |
| 259 | return SkNEW_ARGS(BBoxBuildBench, ("(unsorted)concentric", |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 260 | &make_concentric_rects_increasing, true, SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 261 | ) |
| 262 | DEF_BENCH( |
| 263 | return SkNEW_ARGS(BBoxQueryBench, ("concentric", &make_concentric_rects_increasing, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 264 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 265 | ) |
| 266 | DEF_BENCH( |
| 267 | return SkNEW_ARGS(BBoxQueryBench, ("(unsorted)concentric", &make_concentric_rects_increasing, true, |
sglez@google.com | 8c90212 | 2013-08-30 17:27:47 +0000 | [diff] [blame] | 268 | BBoxQueryBench::kRandom_QueryType, SkRTree::Create(5, 16, 1, false))); |
mtklein@google.com | 410e6e8 | 2013-09-13 19:52:27 +0000 | [diff] [blame] | 269 | ) |