改代码前
This commit is contained in:
@@ -47,7 +47,7 @@ std::string exception_description(const std::exception_ptr& failure) {
|
||||
return "empty Plot failure";
|
||||
}
|
||||
|
||||
enum class Frame_Pacing_Mode : std::uint8_t {
|
||||
enum struct Frame_Pacing_Mode : std::uint8_t {
|
||||
manual,
|
||||
fixed_rate,
|
||||
maximum_rate
|
||||
@@ -60,7 +60,7 @@ struct Frame_Pacing_Properties {
|
||||
double fixed_rate_fps{100.0}; /* 页面级时钟当前上限为每秒一百次。 */
|
||||
};
|
||||
|
||||
class Frame_Policy final {
|
||||
struct Frame_Policy final {
|
||||
public:
|
||||
[[nodiscard]] Frame_Pacing_Properties read() const {
|
||||
return *pacing.load(std::memory_order_acquire);
|
||||
@@ -336,7 +336,7 @@ struct Plot::Private {
|
||||
using Scene = std::variant<std::unique_ptr<Scene_2D>, std::unique_ptr<Scene_3D>>;
|
||||
using Frame = std::variant<std::unique_ptr<Frame_2D>, std::unique_ptr<Frame_3D>>;
|
||||
|
||||
enum class Frame_State : std::uint8_t {
|
||||
enum struct Frame_State : std::uint8_t {
|
||||
available,
|
||||
in_flight,
|
||||
callback_retired
|
||||
@@ -1103,8 +1103,7 @@ nlohmann::json Plot::diagnostics() const {
|
||||
{"callback_failure_count", gpu.callback_failure_count},
|
||||
{"backpressure_count", gpu.backpressure_count},
|
||||
{"fault_count", gpu.fault_count},
|
||||
{"abandoned_count", gpu.abandoned_count},
|
||||
{"stopping", gpu.stopping}};
|
||||
{"abandoned_count", gpu.abandoned_count}};
|
||||
}
|
||||
if (const auto failure = d->terminal_failure.load(std::memory_order_acquire))
|
||||
output["terminal_failure"] = *failure;
|
||||
|
||||
Reference in New Issue
Block a user