Isolate rendering state per window presentation
Verify Tessera GUI / verify (push) Failing after 7m26s

This commit is contained in:
2026-10-21 17:42:11 +08:00
parent 96319b13a3
commit f8173168fd
10 changed files with 285 additions and 88 deletions
+10
View File
@@ -112,6 +112,9 @@ impl RenderDocument {
bail!("frame exceeds the 10,000 command limit");
}
if self.frame.window == 0 {
bail!("invalid window identity");
}
parse_color(&self.frame.background)?;
for command in &self.frame.commands {
command.validate()?;
@@ -262,6 +265,8 @@ impl CodeNode {
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Frame {
#[serde(default = "default_window")]
pub window: u64,
#[serde(default = "default_background")]
pub background: String,
#[serde(default)]
@@ -283,6 +288,7 @@ pub struct Frame {
impl Default for Frame {
fn default() -> Self {
Self {
window: crate::window::MAIN_WINDOW,
background: default_background(),
commands: Vec::new(),
mounts: Vec::new(),
@@ -322,6 +328,10 @@ impl Frame {
}
}
fn default_window() -> u64 {
crate::window::MAIN_WINDOW
}
fn default_background() -> String {
"#F7F7F5".to_owned()
}