blob: c5c1b8fcf21cdb6d5bfbc6a7e1d0a9a367288501 [file] [log] [blame]
#pragma once
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#ifdef BINDER_STABILITY_SUPPORT
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
#include <array>
#include <android/binder_enums.h>
namespace aidl {
namespace android {
namespace hardware {
namespace graphics {
namespace common {
enum class BlendMode : int32_t {
INVALID = 0,
NONE = 1,
PREMULTIPLIED = 2,
COVERAGE = 3,
};
[[nodiscard]] static inline std::string toString(BlendMode val) {
switch(val) {
case BlendMode::INVALID:
return "INVALID";
case BlendMode::NONE:
return "NONE";
case BlendMode::PREMULTIPLIED:
return "PREMULTIPLIED";
case BlendMode::COVERAGE:
return "COVERAGE";
default:
return std::to_string(static_cast<int32_t>(val));
}
}
} // namespace common
} // namespace graphics
} // namespace hardware
} // namespace android
} // namespace aidl
namespace ndk {
namespace internal {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++17-extensions"
template <>
constexpr inline std::array<aidl::android::hardware::graphics::common::BlendMode, 4> enum_values<aidl::android::hardware::graphics::common::BlendMode> = {
aidl::android::hardware::graphics::common::BlendMode::INVALID,
aidl::android::hardware::graphics::common::BlendMode::NONE,
aidl::android::hardware::graphics::common::BlendMode::PREMULTIPLIED,
aidl::android::hardware::graphics::common::BlendMode::COVERAGE,
};
#pragma clang diagnostic pop
} // namespace internal
} // namespace android