56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
#pragma once
|
|
#include <cstdint>
|
|
namespace renderive {
|
|
enum class Refresh_Limit_Source : std::uint8_t {
|
|
Unknown,
|
|
Render,
|
|
Paint,
|
|
User
|
|
};
|
|
|
|
enum Frame_Role : std::uint8_t {
|
|
Frame_Rendering,
|
|
Frame_Middle,
|
|
Frame_Painting
|
|
};
|
|
|
|
enum class Frame_Outcome : std::uint8_t {
|
|
Presented,
|
|
Superseded,
|
|
Render_Acquire_Dropped,
|
|
Publish_Dropped,
|
|
Paint_Acquire_Dropped,
|
|
Worker_Budget_Dropped,
|
|
Cancelled
|
|
};
|
|
/// @brief Rendering cache strategy for a renderable subtree.
|
|
enum class Renderable_Cache_Mode : std::uint8_t {
|
|
/// @brief Draw directly into the target painter each frame.
|
|
Direct,
|
|
/// @brief Rebuild a local image cache when state changes, then compose it.
|
|
Local_Pixel
|
|
};
|
|
/// @brief Internal state triple-buffer role.
|
|
enum State_Role : std::uint8_t {
|
|
/// @brief Editable configuration state.
|
|
State_Edit,
|
|
/// @brief Committed state ready for the render thread.
|
|
State_Ready,
|
|
/// @brief State currently used by the render thread.
|
|
State_Render
|
|
};
|
|
/// @brief Internal input triple-buffer role.
|
|
enum Input_Role : std::uint8_t {
|
|
/// @brief Input buffer receiving caller submissions.
|
|
Input_Edit,
|
|
/// @brief Input buffer ready for render-thread consumption.
|
|
Input_Ready,
|
|
/// @brief Input buffer currently consumed by the render thread.
|
|
Input_Render
|
|
};
|
|
/// @brief Internal color-frame triple-buffer role.
|
|
inline bool buffer_version_newer(std::uint64_t a, std::uint64_t b) {
|
|
return static_cast<std::int64_t>(a - b) > 0;
|
|
}
|
|
} // namespace renderive
|