Revert "frame-resize refactor"

This reverts commit bca565a1a3.
This commit is contained in:
Matt Brubeck 2017-01-23 16:44:56 -08:00
parent 58e8ae8607
commit 6ead3952a3
6 changed files with 44 additions and 54 deletions

View file

@ -342,13 +342,15 @@ fn initialize_png(width: usize, height: usize) -> RenderTargetInfo {
struct RenderNotifier {
compositor_proxy: Box<CompositorProxy>,
constellation_chan: Sender<ConstellationMsg>,
}
impl RenderNotifier {
fn new(compositor_proxy: Box<CompositorProxy>,
_: Sender<ConstellationMsg>) -> RenderNotifier {
constellation_chan: Sender<ConstellationMsg>) -> RenderNotifier {
RenderNotifier {
compositor_proxy: compositor_proxy,
constellation_chan: constellation_chan,
}
}
}
@ -363,8 +365,16 @@ impl webrender_traits::RenderNotifier for RenderNotifier {
}
fn pipeline_size_changed(&mut self,
_: webrender_traits::PipelineId,
_: Option<webrender_traits::LayoutSize>) {
pipeline_id: webrender_traits::PipelineId,
size: Option<webrender_traits::LayoutSize>) {
let pipeline_id = pipeline_id.from_webrender();
if let Some(size) = size {
let msg = ConstellationMsg::FrameSize(pipeline_id, size.to_untyped());
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Compositor resize to constellation failed ({}).", e);
}
}
}
}