mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove generation, remove filter pop, and add size tests.
This commit is contained in:
parent
ea6a61af59
commit
940cda1d15
8 changed files with 14 additions and 24 deletions
|
@ -49,10 +49,6 @@ pub struct SharedStyleContext {
|
|||
/// The CSS selector stylist.
|
||||
pub stylist: Arc<Stylist>,
|
||||
|
||||
/// Starts at zero, and increased by one every time a layout completes.
|
||||
/// This can be used to easily check for invalid stale data.
|
||||
pub generation: u32,
|
||||
|
||||
/// Why is this reflow occurring
|
||||
pub goal: ReflowGoal,
|
||||
|
||||
|
|
|
@ -25,9 +25,6 @@ pub struct PerDocumentStyleDataImpl {
|
|||
/// Rule processor.
|
||||
pub stylist: Arc<Stylist>,
|
||||
|
||||
/// Last restyle generation.
|
||||
pub last_restyle_generation: u32,
|
||||
|
||||
/// List of stylesheets, mirrored from Gecko.
|
||||
pub stylesheets: Vec<Arc<Stylesheet>>,
|
||||
|
||||
|
@ -67,7 +64,6 @@ impl PerDocumentStyleData {
|
|||
|
||||
PerDocumentStyleData(AtomicRefCell::new(PerDocumentStyleDataImpl {
|
||||
stylist: Arc::new(Stylist::new(device)),
|
||||
last_restyle_generation: 0,
|
||||
stylesheets: vec![],
|
||||
stylesheets_changed: true,
|
||||
new_animations_sender: new_anims_sender,
|
||||
|
@ -105,12 +101,6 @@ impl PerDocumentStyleDataImpl {
|
|||
self.stylesheets_changed = false;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next_generation(&mut self) -> u32 {
|
||||
self.last_restyle_generation =
|
||||
self.last_restyle_generation.wrapping_add(1);
|
||||
self.last_restyle_generation
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl HasFFI for PerDocumentStyleData {
|
||||
|
|
|
@ -18,10 +18,6 @@ use std::mem;
|
|||
use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
|
||||
use stylist::Stylist;
|
||||
|
||||
/// Every time we do another layout, the old bloom filters are invalid. This is
|
||||
/// detected by ticking a generation number every layout.
|
||||
pub type Generation = u32;
|
||||
|
||||
/// Style sharing candidate cache stats. These are only used when
|
||||
/// `-Z style-sharing-stats` is given.
|
||||
pub static STYLE_SHARING_CACHE_HITS: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue