compositing: Implement display ports and avoid creating display lists

for items outside it.

This improves Servo's performance on large pages.
This commit is contained in:
Patrick Walton 2015-05-13 17:13:59 -07:00
parent acb9824229
commit 6a197719b3
26 changed files with 340 additions and 66 deletions

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate geom;
extern crate gfx;
extern crate script_traits;
extern crate msg;
@ -15,25 +16,29 @@ extern crate util;
// The traits are here instead of in layout so
// that these modules won't have to depend on layout.
use geom::rect::Rect;
use gfx::font_cache_task::FontCacheTask;
use gfx::paint_task::PaintChan;
use msg::compositor_msg::Epoch;
use msg::compositor_msg::{Epoch, LayerId};
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId, PipelineExitType};
use profile_traits::mem;
use profile_traits::time;
use net_traits::image_cache_task::ImageCacheTask;
use url::Url;
use script_traits::{ScriptControlChan, OpaqueScriptLayoutChannel};
use std::sync::mpsc::{Sender, Receiver};
use util::geometry::Au;
use url::Url;
/// Messages sent to the layout task from the constellation
/// Messages sent to the layout task from the constellation and/or compositor.
pub enum LayoutControlMsg {
ExitNow(PipelineExitType),
GetCurrentEpoch(Sender<Epoch>),
TickAnimations,
SetVisibleRects(Vec<(LayerId, Rect<Au>)>),
}
/// A channel wrapper for constellation messages
#[derive(Clone)]
pub struct LayoutControlChan(pub Sender<LayoutControlMsg>);
// A static method creating a layout task