24 lines
710 B
C++
24 lines
710 B
C++
#pragma once
|
|
#include "Plot_Frame_Pipeline.h"
|
|
#include "../render/Image_View.h"
|
|
#include <cstdint>
|
|
#include <memory>
|
|
namespace renderive {
|
|
class Present_Frame_Lease {
|
|
public:
|
|
Present_Frame_Lease();
|
|
Present_Frame_Lease(Present_Frame_Lease&&) noexcept;
|
|
Present_Frame_Lease& operator=(Present_Frame_Lease&&) noexcept;
|
|
~Present_Frame_Lease();
|
|
[[nodiscard]] explicit operator bool() const;
|
|
[[nodiscard]] bool new_frame() const;
|
|
[[nodiscard]] bool request_was_pending() const;
|
|
[[nodiscard]] Image_View image() const;
|
|
private:
|
|
friend class Plot_Core;
|
|
std::unique_ptr<Plot_Frame_Lease> lease_;
|
|
bool is_new_frame{};
|
|
bool update_was_pending{};
|
|
};
|
|
} // namespace renderive
|