1#ifndef ACMXVK_APP_SNAPSHOT_WRITER_HPP
2#define ACMXVK_APP_SNAPSHOT_WRITER_HPP
6#include <condition_variable>
22 std::vector<std::uint8_t>
rgba;
38 [[nodiscard]]
bool start();
43 static
void savePng(const fs::path &path, std::uint8_t *rgba,
44 int width,
int height);
45 [[nodiscard]] static std::string_view
51 static
void saveRaw(const fs::path &path,
52 const std::vector<std::uint8_t> &rgba,
53 std::uint32_t width, std::uint32_t height);
54 static
void saveRaw16(const fs::path &path,
55 const std::vector<std::uint16_t> &rgba,
56 std::uint32_t width, std::uint32_t height);
57#ifdef ACMXVK_WITH_WEBP
58 static void saveWebP(
const fs::path &path,
const std::uint8_t *rgba,
59 int width,
int height);
61#ifdef ACMXVK_WITH_TIFF
62 static void saveTiff(
const fs::path &path,
const std::uint8_t *rgba,
63 int width,
int height);
64 static void saveTiff16(
const fs::path &path,
65 const std::uint16_t *rgba,
int width,
std::condition_variable condition
static void saveRaw16(const fs::path &path, const std::vector< std::uint16_t > &rgba, std::uint32_t width, std::uint32_t height)
static void savePng(const fs::path &path, std::uint8_t *rgba, int width, int height)
SnapshotWriter & operator=(SnapshotWriter &&)=delete
std::deque< SnapshotJob > jobs
static std::string_view formatName(SnapshotFormat format) noexcept
static void saveRaw(const fs::path &path, const std::vector< std::uint8_t > &rgba, std::uint32_t width, std::uint32_t height)
std::size_t jobs_in_flight
SnapshotWriter(SnapshotWriter &&)=delete
static constexpr std::size_t QUEUE_CAPACITY
void workerLoop() noexcept
SnapshotWriter & operator=(const SnapshotWriter &)=delete
void enqueue(SnapshotJob job)
SnapshotWriter(const SnapshotWriter &)=delete
std::vector< std::uint16_t > rgba16
std::vector< std::uint8_t > rgba