aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/compositor_task.rs
diff options
context:
space:
mode:
authorGlenn Watson <gw@intuitionlibrary.com>2015-05-12 10:34:05 +1000
committerGlenn Watson <gw@intuitionlibrary.com>2015-05-12 10:34:05 +1000
commit79942f0920eed3fbdbf96454f07dd5009f2a8fe6 (patch)
tree658c034f7fd7143dc2e3efcad0063deb3fbb448a /components/compositing/compositor_task.rs
parent885068207f05b81bcf6f9fc14184a0b4d44eca10 (diff)
downloadservo-79942f0920eed3fbdbf96454f07dd5009f2a8fe6.tar.gz
servo-79942f0920eed3fbdbf96454f07dd5009f2a8fe6.zip
Fix a compositor race condition that can result in the most recent buffer not being painted.
Diffstat (limited to 'components/compositing/compositor_task.rs')
-rw-r--r--components/compositing/compositor_task.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs
index bed4255e34b..31b45f90d2b 100644
--- a/components/compositing/compositor_task.rs
+++ b/components/compositing/compositor_task.rs
@@ -17,7 +17,7 @@ use geom::rect::Rect;
use geom::size::Size2D;
use layers::platform::surface::{NativeCompositingGraphicsContext, NativeGraphicsMetadata};
use layers::layers::LayerBufferSet;
-use msg::compositor_msg::{Epoch, LayerId, LayerMetadata, ReadyState};
+use msg::compositor_msg::{Epoch, LayerId, LayerMetadata, FrameTreeId, ReadyState};
use msg::compositor_msg::{PaintListener, PaintState, ScriptListener, ScrollPolicy};
use msg::constellation_msg::{AnimationState, ConstellationChan, PipelineId};
use msg::constellation_msg::{Key, KeyState, KeyModifiers};
@@ -134,8 +134,9 @@ impl PaintListener for Box<CompositorProxy+'static+Send> {
fn assign_painted_buffers(&mut self,
pipeline_id: PipelineId,
epoch: Epoch,
- replies: Vec<(LayerId, Box<LayerBufferSet>)>) {
- self.send(Msg::AssignPaintedBuffers(pipeline_id, epoch, replies));
+ replies: Vec<(LayerId, Box<LayerBufferSet>)>,
+ frame_tree_id: FrameTreeId) {
+ self.send(Msg::AssignPaintedBuffers(pipeline_id, epoch, replies, frame_tree_id));
}
fn initialize_layers_for_pipeline(&mut self,
@@ -194,7 +195,7 @@ pub enum Msg {
/// Scroll a page in a window
ScrollFragmentPoint(PipelineId, LayerId, Point2D<f32>),
/// Requests that the compositor assign the painted buffers to the given layers.
- AssignPaintedBuffers(PipelineId, Epoch, Vec<(LayerId, Box<LayerBufferSet>)>),
+ AssignPaintedBuffers(PipelineId, Epoch, Vec<(LayerId, Box<LayerBufferSet>)>, FrameTreeId),
/// Alerts the compositor to the current status of page loading.
ChangeReadyState(PipelineId, ReadyState),
/// Alerts the compositor to the current status of painting.