gardesk/garbg / 76ffb7a

Browse files

add memory_budget_mb to AnimationConfig for bounded animation memory

Authored by espadonne
SHA
76ffb7a65877448b4df648e5a1fb591f0c179496
Parents
744615f
Tree
f173810

1 changed file

StatusFile+-
M garbg/src/config/types.rs 5 0
garbg/src/config/types.rsmodified
@@ -70,6 +70,10 @@ pub struct AnimationConfig {
7070
 
7171
     /// Pause animations when idle/locked
7272
     pub pause_on_idle: bool,
73
+
74
+    /// Maximum memory budget for pre-scaled animation frames (in MB).
75
+    /// Animations exceeding this budget will stream-scale frames on the fly.
76
+    pub memory_budget_mb: u64,
7377
 }
7478
 
7579
 impl Default for AnimationConfig {
@@ -78,6 +82,7 @@ impl Default for AnimationConfig {
7882
             enabled: true,
7983
             max_fps: 60,
8084
             pause_on_idle: true,
85
+            memory_budget_mb: 256,
8186
         }
8287
     }
8388
 }