mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix a compositor race condition that can result in the most recent buffer not being painted.
This commit is contained in:
parent
885068207f
commit
79942f0920
4 changed files with 44 additions and 22 deletions
|
@ -43,6 +43,16 @@ impl Epoch {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
|
||||
pub struct FrameTreeId(pub u32);
|
||||
|
||||
impl FrameTreeId {
|
||||
pub fn next(&mut self) {
|
||||
let FrameTreeId(ref mut u) = *self;
|
||||
*u += 1;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy)]
|
||||
pub struct LayerId(pub usize, pub u32);
|
||||
|
||||
|
@ -99,7 +109,8 @@ pub trait PaintListener {
|
|||
fn assign_painted_buffers(&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
epoch: Epoch,
|
||||
replies: Vec<(LayerId, Box<LayerBufferSet>)>);
|
||||
replies: Vec<(LayerId, Box<LayerBufferSet>)>,
|
||||
frame_tree_id: FrameTreeId);
|
||||
|
||||
fn paint_msg_discarded(&mut self);
|
||||
fn set_paint_state(&mut self, PipelineId, PaintState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue