#ifndef CC_BENCHMARKS_INVALIDATION_BENCHMARK_H_
#define CC_BENCHMARKS_INVALIDATION_BENCHMARK_H_
#include <stdint.h>
#include "cc/benchmarks/micro_benchmark_controller.h"
namespace cc {
class LayerTreeHost;
class CC_EXPORT InvalidationBenchmark : public MicroBenchmark {
public:
explicit InvalidationBenchmark(base::Value::Dict settings,
MicroBenchmark::DoneCallback callback);
~InvalidationBenchmark() override;
void DidUpdateLayers(LayerTreeHost* layer_tree_host) override;
void RunOnLayer(PictureLayer* layer) override;
bool ProcessMessage(base::Value::Dict message) override;
private:
enum Mode { FIXED_SIZE, LAYER, VIEWPORT, RANDOM };
float LCGRandom();
Mode mode_;
int width_;
int height_;
uint32_t seed_ = 0;
};
}
#endif