策略抽离

This commit is contained in:
2026-08-02 14:20:27 +08:00
parent 6d000f43b4
commit 2df8959ed6
87 changed files with 2454 additions and 1390 deletions
+8 -6
View File
@@ -3,19 +3,21 @@
namespace renderive {
Explicit_Plot_Private::Explicit_Plot_Private()
: Abs_Plot_Private(std::make_unique<Explicit_Refresh_Strategy>()) {
explicit_strategy = static_cast<Explicit_Refresh_Strategy*>(strategy);
: Abs_Plot_Private(std::make_unique<Explicit_Frame_Flow>()) {
explicit_flow = static_cast<Explicit_Frame_Flow*>(flow);
}
Explicit_Plot::Explicit_Plot()
: Abs_Plot(new Explicit_Plot_Private()) {}
void Explicit_Plot::replot() {
Render_Ticket Explicit_Plot::replot() {
auto* data = static_cast<Explicit_Plot_Private*>(d);
if (data->explicit_strategy) {
data->explicit_strategy->request_render();
data->core->request_manual_refresh();
if (data->explicit_flow) {
Render_Ticket ticket = data->explicit_flow->request_render();
data->core->request_explicit_render();
return ticket;
}
return {};
}
} // namespace renderive