策略抽离
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user