Support shared-VM native windows and Page detachment
Verify Tessera GUI / verify (push) Failing after 7m35s
Verify Tessera GUI / verify (push) Failing after 7m35s
This commit is contained in:
@@ -19,6 +19,7 @@ pub struct NamespaceState {
|
||||
pub submission: u64,
|
||||
pub document: RenderDocument,
|
||||
pub viewport: Option<crate::layout::Size>,
|
||||
pub window_viewports: std::collections::BTreeMap<u64, crate::layout::Size>,
|
||||
pub runtime_session: u64,
|
||||
pub window_commands: Vec<crate::window::Envelope>,
|
||||
}
|
||||
@@ -31,6 +32,7 @@ impl Default for NamespaceState {
|
||||
submission: 0,
|
||||
document: RenderDocument::default(),
|
||||
viewport: None,
|
||||
window_viewports: std::collections::BTreeMap::new(),
|
||||
runtime_session: 0,
|
||||
window_commands: Vec::new(),
|
||||
}
|
||||
@@ -93,6 +95,8 @@ impl NamespaceState {
|
||||
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct RenderDocument {
|
||||
#[serde(default, skip_serializing_if = "std::collections::BTreeMap::is_empty")]
|
||||
pub windows: std::collections::BTreeMap<u64, RenderDocument>,
|
||||
#[serde(skip)]
|
||||
pub ui_root: Option<Arc<UiNode>>,
|
||||
#[serde(default)]
|
||||
@@ -105,6 +109,18 @@ pub struct RenderDocument {
|
||||
|
||||
impl RenderDocument {
|
||||
pub fn validate(&self) -> Result<()> {
|
||||
if self.windows.len() > 15 {
|
||||
bail!("too many window projections");
|
||||
}
|
||||
for (id, document) in &self.windows {
|
||||
if *id == crate::window::MAIN_WINDOW
|
||||
|| *id != document.frame.window
|
||||
|| !document.windows.is_empty()
|
||||
{
|
||||
bail!("invalid secondary window projection");
|
||||
}
|
||||
document.validate()?;
|
||||
}
|
||||
if self.source.len() > 1_048_576 {
|
||||
bail!("source exceeds the 1 MiB limit");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user