From ed44ea64a8928d0df162a5cce932eef9bbb5ff55 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Nov 2023 18:31:17 +0100 Subject: bbb --- bench/03-bitmask.cpp | 27 +++++++++++++++++++++++++++ external/corrade | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 bench/03-bitmask.cpp diff --git a/bench/03-bitmask.cpp b/bench/03-bitmask.cpp new file mode 100644 index 00000000..c8c698a6 --- /dev/null +++ b/bench/03-bitmask.cpp @@ -0,0 +1,27 @@ +#include "compat/assert.hpp" +#include "src/anim-atlas.hpp" +#include "loader/loader.hpp" +#include +#include +#include +#include + +namespace floormat { + +namespace { + +[[maybe_unused]] void Bitmask(benchmark::State& state) +{ + auto img = loader.texture(loader.SCENERY_PATH, "door-close"_s); + auto bitmask = anim_atlas::make_bitmask(img); + anim_atlas::make_bitmask_(img, bitmask); + + for (auto _ : state) + anim_atlas::make_bitmask_(img, bitmask); +} + +BENCHMARK(Bitmask)->Unit(benchmark::kMicrosecond)->ReportAggregatesOnly(); + +} // namespace + +} // namespace floormat diff --git a/external/corrade b/external/corrade index c28350b3..d08e3539 160000 --- a/external/corrade +++ b/external/corrade @@ -1 +1 @@ -Subproject commit c28350b3f83a65123794f722772b56cd7c0fe639 +Subproject commit d08e3539b0b9c1a797913bdd2cc2533fe5c9e147 -- cgit v1.2.3