还是一堆bug的状态
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "Explicit_Refresh_Strategy.h"
|
||||
|
||||
namespace renderive {
|
||||
|
||||
void Explicit_Refresh_Strategy::request_render() {
|
||||
manual_request_pending.store(true, std::memory_order_release);
|
||||
}
|
||||
|
||||
Refresh_Action Explicit_Refresh_Strategy::on_trigger(
|
||||
Refresh_Trigger,
|
||||
const Refresh_Runtime_Snapshot& runtime,
|
||||
const Frame_Lifecycle_Record*) {
|
||||
Refresh_Action action;
|
||||
if (!manual_request_pending.load(std::memory_order_acquire))
|
||||
return action;
|
||||
if (!runtime.enabled || runtime.destroying || runtime.render_job_active)
|
||||
return action;
|
||||
manual_request_pending.store(false, std::memory_order_release);
|
||||
action.try_render = true;
|
||||
if (runtime.middle_has_new_frame && !runtime.paint_active)
|
||||
action.request_paint = true;
|
||||
return action;
|
||||
}
|
||||
|
||||
} // namespace renderive
|
||||
Reference in New Issue
Block a user