add memory_budget_mb to AnimationConfig for bounded animation memory
- SHA
76ffb7a65877448b4df648e5a1fb591f0c179496- Parents
-
744615f - Tree
f173810
76ffb7a
76ffb7a65877448b4df648e5a1fb591f0c179496744615f
f173810| Status | File | + | - |
|---|---|---|---|
| M |
garbg/src/config/types.rs
|
5 | 0 |
garbg/src/config/types.rsmodified@@ -70,6 +70,10 @@ pub struct AnimationConfig { | ||
| 70 | 70 | |
| 71 | 71 | /// Pause animations when idle/locked |
| 72 | 72 | 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, | |
| 73 | 77 | } |
| 74 | 78 | |
| 75 | 79 | impl Default for AnimationConfig { |
@@ -78,6 +82,7 @@ impl Default for AnimationConfig { | ||
| 78 | 82 | enabled: true, |
| 79 | 83 | max_fps: 60, |
| 80 | 84 | pause_on_idle: true, |
| 85 | + memory_budget_mb: 256, | |
| 81 | 86 | } |
| 82 | 87 | } |
| 83 | 88 | } |