diff options
Diffstat (limited to 'components/compositing')
-rw-r--r-- | components/compositing/constellation.rs | 13 | ||||
-rw-r--r-- | components/compositing/pipeline.rs | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index b41f75c7b6e..b52a1a22395 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -1675,6 +1675,19 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF> ReadyToSave::Ready } + /// Checks whether the pipeline or its ancestors are private + #[allow(dead_code)] + fn check_is_pipeline_private(&self, pipeline_id: PipelineId) -> bool { + let mut pipeline_id = Some(pipeline_id); + while let Some(pipeline) = pipeline_id.and_then(|id| self.pipelines.get(&id)) { + if pipeline.is_private { + return true; + } + pipeline_id = pipeline.parent_info.map(|(parent_pipeline_id, _)| parent_pipeline_id); + } + false + } + // Close a frame (and all children) fn close_frame(&mut self, frame_id: FrameId, exit_mode: ExitPipelineMode) { // Store information about the pipelines to be closed. Then close the diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 40b1a2baa6a..bb96e2a6518 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -58,6 +58,7 @@ pub struct Pipeline { /// animations cause composites to be continually scheduled. pub running_animations: bool, pub children: Vec<FrameId>, + pub is_private: bool, } /// The subset of the pipeline that is needed for layer composition. @@ -275,6 +276,7 @@ impl Pipeline { children: vec!(), size: size, running_animations: false, + is_private: false, } } |