Rework “visible” to “throttled” in constellation + script + compositor (#31816)

This commit is contained in:
Delan Azabani 2024-03-22 14:06:28 +08:00 committed by GitHub
parent 9b26dca141
commit 8882507ad0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 124 additions and 129 deletions

View file

@ -32,9 +32,9 @@ pub struct NewBrowsingContextInfo {
/// Whether this browsing context inherits a secure context.
pub inherited_secure_context: Option<bool>,
/// Whether this browsing context should be treated as visible for the
/// purposes of scheduling and resource management.
pub is_visible: bool,
/// Whether this browsing context should be throttled, using less resources
/// by stopping animations and running timers at a heavily limited rate.
pub throttled: bool,
}
/// The constellation's view of a browsing context.
@ -62,9 +62,9 @@ pub struct BrowsingContext {
/// Whether this browsing context inherits a secure context.
pub inherited_secure_context: Option<bool>,
/// Whether this browsing context should be treated as visible for the
/// purposes of scheduling and resource management.
pub is_visible: bool,
/// Whether this browsing context should be throttled, using less resources
/// by stopping animations and running timers at a heavily limited rate.
pub throttled: bool,
/// The pipeline for the current session history entry.
pub pipeline_id: PipelineId,
@ -90,7 +90,7 @@ impl BrowsingContext {
size: Size2D<f32, CSSPixel>,
is_private: bool,
inherited_secure_context: Option<bool>,
is_visible: bool,
throttled: bool,
) -> BrowsingContext {
let mut pipelines = HashSet::new();
pipelines.insert(pipeline_id);
@ -101,7 +101,7 @@ impl BrowsingContext {
size,
is_private,
inherited_secure_context,
is_visible,
throttled,
pipeline_id,
parent_pipeline_id,
pipelines,