aboutsummaryrefslogtreecommitdiff
path: root/src/context.hh
diff options
context:
space:
mode:
authorNicolas James <nj3ahxac@gmail.com>2026-03-11 10:32:26 +1100
committerNicolas James <nj3ahxac@gmail.com>2026-03-11 10:32:26 +1100
commit733955de0ae90de26fe98854a1debd6b80ccc27a (patch)
tree6424a26bb8f5434d1ad6952f16ba6a79b3b5991f /src/context.hh
parentf10074d9897850b9b746ff8d8e0b2dc4af24f3ff (diff)
Add LOW_LATENCY_LAYER_SLEEP_AFTER_PRESENT env as an explicit AL1 toggle
Diffstat (limited to 'src/context.hh')
-rw-r--r--src/context.hh15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/context.hh b/src/context.hh
index 5972740..91fbf91 100644
--- a/src/context.hh
+++ b/src/context.hh
@@ -1,13 +1,20 @@
#ifndef CONTEXT_HH_
#define CONTEXT_HH_
-// The purpose of this class is to provide a base class for Context classes.
-
namespace low_latency {
+// A context class doesn't do much by itself. We just use it to provide a
+// virtual destructor so we can store a bunch of shared_ptrs in the same
+// container and rely on RTTI in the layer context. It also deletes the copy and
+// move constructors for derived classes implicitly, and that's pretty much it.
+//
+// We _could_ do something weird and complicated where we define virtual pure
+// hashing and equality functions so we can store them in an unordered_set, but
+// it's just unnecessary complexity and doesn't allow us to perform 'do you exist'
+// lookups without creating an object.
class Context {
-
-public:
+
+ public:
Context();
Context(const Context& context) = delete;
Context(Context&& context) = delete;