接入3D secene taskflow
This commit is contained in:
@@ -23,18 +23,6 @@ void Renderable::set_cache_mode(Renderable_Cache_Mode mode) {
|
||||
{.cache_enabled = mode == Renderable_Cache_Mode::Local_Pixel});
|
||||
}
|
||||
|
||||
std::string Renderable::object_name() const {
|
||||
const auto& d = d_func<Impl>();
|
||||
std::lock_guard lock(d.metadata_mutex);
|
||||
return d.object_name;
|
||||
}
|
||||
|
||||
void Renderable::set_object_name(std::string name) {
|
||||
auto& d = d_func<Impl>();
|
||||
std::lock_guard lock(d.metadata_mutex);
|
||||
d.object_name = std::move(name);
|
||||
}
|
||||
|
||||
Renderable_Observation Renderable::observation() const noexcept {
|
||||
const auto& d = d_func<Impl>();
|
||||
std::lock_guard lock(d.observation_mutex);
|
||||
|
||||
@@ -37,8 +37,6 @@ struct LIB_DECL Renderable
|
||||
~Renderable() override;
|
||||
[[nodiscard]] Renderable_Cache_Mode get_cache_mode() const noexcept;
|
||||
void set_cache_mode(Renderable_Cache_Mode mode);
|
||||
[[nodiscard]] std::string object_name() const;
|
||||
void set_object_name(std::string name);
|
||||
[[nodiscard]] Renderable_Observation observation() const noexcept;
|
||||
void dispatch_event(const Event& event);
|
||||
protected:
|
||||
|
||||
@@ -92,8 +92,6 @@ private:
|
||||
void observe_state(Renderable_Observer_Event event, std::uint64_t time_ns,
|
||||
std::uint64_t cache_update_count,
|
||||
std::uint64_t publish_count) noexcept;
|
||||
mutable std::mutex metadata_mutex;
|
||||
std::string object_name;
|
||||
mutable std::mutex observation_mutex;
|
||||
Renderable_Observation observation;
|
||||
friend class Renderable;
|
||||
|
||||
@@ -262,7 +262,7 @@ struct Basic_Scene2D final : ::Scene2D_Context<Frame_Control, detail::Blend2D_Co
|
||||
auto paint_frame = this->frame_control.acquire_painter();
|
||||
if (!paint_frame)
|
||||
return false;
|
||||
this->publish_frame_state();
|
||||
this->publish_frame_state(*paint_frame);
|
||||
return true;
|
||||
}
|
||||
[[nodiscard]] bool refresh_manual_frame() {
|
||||
|
||||
Reference in New Issue
Block a user