chore: Remove unused generation counter field from LayoutThread (#36172)

Signed-off-by: TG <ebiritg@gmail.com>
This commit is contained in:
Kelechi Ebiri 2025-03-26 22:57:39 +01:00 committed by GitHub
parent 30a2a89d16
commit c1dce6830e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,10 +128,6 @@ pub struct LayoutThread {
/// Is this the first reflow in this LayoutThread? /// Is this the first reflow in this LayoutThread?
first_reflow: Cell<bool>, first_reflow: Cell<bool>,
/// Starts at zero, and increased by one every time a layout completes.
/// This can be used to easily check for invalid stale data.
generation: Cell<u32>,
/// The box tree. /// The box tree.
box_tree: RefCell<Option<Arc<BoxTree>>>, box_tree: RefCell<Option<Arc<BoxTree>>>,
@ -496,7 +492,6 @@ impl LayoutThread {
image_cache: config.image_cache, image_cache: config.image_cache,
font_context: config.font_context, font_context: config.font_context,
first_reflow: Cell::new(true), first_reflow: Cell::new(true),
generation: Cell::new(0),
box_tree: Default::default(), box_tree: Default::default(),
fragment_tree: Default::default(), fragment_tree: Default::default(),
// Epoch starts at 1 because of the initial display list for epoch 0 that we send to WR // Epoch starts at 1 because of the initial display list for epoch 0 that we send to WR
@ -886,8 +881,6 @@ impl LayoutThread {
self.compositor_api self.compositor_api
.remove_unused_font_resources(keys, instance_keys) .remove_unused_font_resources(keys, instance_keys)
} }
self.generation.set(self.generation.get() + 1);
} }
/// Returns profiling information which is passed to the time profiler. /// Returns profiling information which is passed to the time profiler.