mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Revert "Revert "frame-resize refactor""
This reverts commit 6ead3952a3
.
This commit is contained in:
parent
185759f87a
commit
4639940dfe
6 changed files with 54 additions and 44 deletions
|
@ -342,15 +342,13 @@ 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>,
|
||||
constellation_chan: Sender<ConstellationMsg>) -> RenderNotifier {
|
||||
_: Sender<ConstellationMsg>) -> RenderNotifier {
|
||||
RenderNotifier {
|
||||
compositor_proxy: compositor_proxy,
|
||||
constellation_chan: constellation_chan,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -365,16 +363,8 @@ impl webrender_traits::RenderNotifier for RenderNotifier {
|
|||
}
|
||||
|
||||
fn pipeline_size_changed(&mut self,
|
||||
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);
|
||||
}
|
||||
}
|
||||
_: webrender_traits::PipelineId,
|
||||
_: Option<webrender_traits::LayoutSize>) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue