@@ -220,60 +220,6 @@ static void BM_DisplayListDispatchDefault(
220
220
}
221
221
}
222
222
223
- static void BM_DisplayListDispatchByIndexDefault (
224
- benchmark::State& state,
225
- DisplayListDispatchBenchmarkType type) {
226
- bool prepare_rtree = NeedPrepareRTree (type);
227
- DisplayListBuilder builder (prepare_rtree);
228
- for (int i = 0 ; i < 5 ; i++) {
229
- InvokeAllOps (builder);
230
- }
231
- auto display_list = builder.Build ();
232
- DlOpReceiverIgnore receiver;
233
- while (state.KeepRunning ()) {
234
- DlIndex end = display_list->GetRecordCount ();
235
- for (DlIndex i = 0u ; i < end; i++) {
236
- display_list->Dispatch (receiver, i);
237
- }
238
- }
239
- }
240
-
241
- static void BM_DisplayListDispatchByIteratorDefault (
242
- benchmark::State& state,
243
- DisplayListDispatchBenchmarkType type) {
244
- bool prepare_rtree = NeedPrepareRTree (type);
245
- DisplayListBuilder builder (prepare_rtree);
246
- for (int i = 0 ; i < 5 ; i++) {
247
- InvokeAllOps (builder);
248
- }
249
- auto display_list = builder.Build ();
250
- DlOpReceiverIgnore receiver;
251
- while (state.KeepRunning ()) {
252
- for (DlIndex i : *display_list) {
253
- display_list->Dispatch (receiver, i);
254
- }
255
- }
256
- }
257
-
258
- static void BM_DisplayListDispatchByVectorDefault (
259
- benchmark::State& state,
260
- DisplayListDispatchBenchmarkType type) {
261
- bool prepare_rtree = NeedPrepareRTree (type);
262
- DisplayListBuilder builder (prepare_rtree);
263
- for (int i = 0 ; i < 5 ; i++) {
264
- InvokeAllOps (builder);
265
- }
266
- auto display_list = builder.Build ();
267
- DlOpReceiverIgnore receiver;
268
- while (state.KeepRunning ()) {
269
- std::vector<DlIndex> indices =
270
- display_list->GetCulledIndices (display_list->bounds ());
271
- for (DlIndex index : indices) {
272
- display_list->Dispatch (receiver, index );
273
- }
274
- }
275
- }
276
-
277
223
static void BM_DisplayListDispatchCull (benchmark::State& state,
278
224
DisplayListDispatchBenchmarkType type) {
279
225
bool prepare_rtree = NeedPrepareRTree (type);
@@ -290,26 +236,6 @@ static void BM_DisplayListDispatchCull(benchmark::State& state,
290
236
}
291
237
}
292
238
293
- static void BM_DisplayListDispatchByVectorCull (
294
- benchmark::State& state,
295
- DisplayListDispatchBenchmarkType type) {
296
- bool prepare_rtree = NeedPrepareRTree (type);
297
- DisplayListBuilder builder (prepare_rtree);
298
- for (int i = 0 ; i < 5 ; i++) {
299
- InvokeAllOps (builder);
300
- }
301
- auto display_list = builder.Build ();
302
- SkRect rect = SkRect::MakeLTRB (0 , 0 , 100 , 100 );
303
- EXPECT_FALSE (rect.contains (display_list->bounds ()));
304
- DlOpReceiverIgnore receiver;
305
- while (state.KeepRunning ()) {
306
- std::vector<DlIndex> indices = display_list->GetCulledIndices (rect);
307
- for (DlIndex index : indices) {
308
- display_list->Dispatch (receiver, index );
309
- }
310
- }
311
- }
312
-
313
239
BENCHMARK_CAPTURE (BM_DisplayListBuilderDefault,
314
240
kDefault ,
315
241
DisplayListBuilderBenchmarkType::kDefault )
@@ -444,24 +370,4 @@ BENCHMARK_CAPTURE(BM_DisplayListDispatchCull,
444
370
DisplayListDispatchBenchmarkType::kCulledWithRtree )
445
371
->Unit (benchmark::kMicrosecond );
446
372
447
- BENCHMARK_CAPTURE (BM_DisplayListDispatchByIndexDefault,
448
- kDefaultNoRtree ,
449
- DisplayListDispatchBenchmarkType::kDefaultNoRtree )
450
- ->Unit (benchmark::kMicrosecond );
451
-
452
- BENCHMARK_CAPTURE (BM_DisplayListDispatchByIteratorDefault,
453
- kDefaultNoRtree ,
454
- DisplayListDispatchBenchmarkType::kDefaultNoRtree )
455
- ->Unit (benchmark::kMicrosecond );
456
-
457
- BENCHMARK_CAPTURE (BM_DisplayListDispatchByVectorDefault,
458
- kDefaultNoRtree ,
459
- DisplayListDispatchBenchmarkType::kDefaultNoRtree )
460
- ->Unit (benchmark::kMicrosecond );
461
-
462
- BENCHMARK_CAPTURE (BM_DisplayListDispatchByVectorCull,
463
- kCulledWithRtree ,
464
- DisplayListDispatchBenchmarkType::kCulledWithRtree )
465
- ->Unit (benchmark::kMicrosecond );
466
-
467
373
} // namespace flutter
0 commit comments