1 // Copyright 2014 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_BENCHMARKS_INVALIDATION_BENCHMARK_H_
6 #define CC_BENCHMARKS_INVALIDATION_BENCHMARK_H_
10 #include "cc/benchmarks/micro_benchmark_controller.h"
16 // NOTE: this benchmark will not measure or return any results, it will simply
17 // invalidate a certain area of each layer every frame. It is intended to be
18 // used in combination with a telemetry benchmark that does the actual
20 class CC_EXPORT InvalidationBenchmark : public MicroBenchmark {
22 explicit InvalidationBenchmark(base::Value::Dict settings,
23 MicroBenchmark::DoneCallback callback);
24 ~InvalidationBenchmark() override;
26 // Implements MicroBenchmark interface.
27 void DidUpdateLayers(LayerTreeHost* layer_tree_host) override;
28 void RunOnLayer(PictureLayer* layer) override;
29 bool ProcessMessage(base::Value::Dict message) override;
32 enum Mode { FIXED_SIZE, LAYER, VIEWPORT, RANDOM };
44 #endif // CC_BENCHMARKS_INVALIDATION_BENCHMARK_H_