From 21e55ae8a1b3ddd4dff6c24a57bdc7d7272fff16 Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Sun, 5 Apr 2026 18:30:25 +1000 Subject: Add boilerplate for separate implementations --- src/device_context.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/device_context.cc') diff --git a/src/device_context.cc b/src/device_context.cc index d61c1bf..a4f3a13 100644 --- a/src/device_context.cc +++ b/src/device_context.cc @@ -1,5 +1,9 @@ #include "device_context.hh" +#include "layer_context.hh" +#include "strategies/anti_lag/device_strategy.hh" +#include "strategies/low_latency2/device_strategy.hh" + #include #include @@ -15,9 +19,17 @@ DeviceContext::DeviceContext(InstanceContext& parent_instance, vtable(std::move(vtable)) { // Only create our clock if we were asked to do anything. - if (this->was_capability_requested) { - this->clock = std::make_unique(*this); + if (!this->was_capability_requested) { + return; } + + this->clock = std::make_unique(*this); + this->strategy = [&]() -> std::unique_ptr { + if (parent_instance.layer.should_expose_reflex) { + return std::make_unique(*this); + } + return std::make_unique(*this); + }(); } DeviceContext::~DeviceContext() { -- cgit v1.2.3