mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Trigger a rule tree gc at the end of DoProcessPendingRestyles.
MozReview-Commit-ID: W2lkQohudA
This commit is contained in:
parent
e93b7fb3e8
commit
a3b32aaa5b
1 changed files with 10 additions and 0 deletions
|
@ -303,6 +303,16 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
|
|||
element.has_dirty_descendants() || element.borrow_data().unwrap().restyle.contains_restyle_data()
|
||||
}
|
||||
|
||||
/// Checks whether the rule tree has crossed its threshold for unused nodes, and
|
||||
/// if so, frees them.
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_MaybeGCRuleTree(raw_data: RawServoStyleSetBorrowed) {
|
||||
let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow_mut();
|
||||
unsafe {
|
||||
per_doc_data.stylist.rule_tree().maybe_gc();
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValues_Interpolate(from: RawServoAnimationValueBorrowed,
|
||||
to: RawServoAnimationValueBorrowed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue