servo/components/compositing/lib.rs
bors-servo ad53e95080 Auto merge of #6083 - ecoal95:layerize-canvas, r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6083)
<!-- Reviewable:end -->
2015-05-20 15:42:06 -05:00

56 lines
1.2 KiB
Rust

/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
#![feature(rustc_private)]
#[macro_use]
extern crate log;
extern crate azure;
extern crate devtools_traits;
extern crate geom;
extern crate gfx;
extern crate layers;
extern crate layout_traits;
extern crate png;
extern crate script_traits;
extern crate msg;
extern crate net;
extern crate num;
extern crate profile_traits;
extern crate net_traits;
extern crate gfx_traits;
extern crate style;
#[macro_use]
extern crate util;
extern crate gleam;
extern crate webdriver_traits;
extern crate clipboard;
extern crate libc;
extern crate time;
extern crate url;
#[cfg(target_os="macos")]
extern crate core_graphics;
#[cfg(target_os="macos")]
extern crate core_text;
pub use compositor_task::{CompositorEventListener, CompositorProxy, CompositorTask};
pub use constellation::Constellation;
pub mod compositor_task;
mod compositor_layer;
mod compositor;
mod headless;
mod scrolling;
pub mod pipeline;
pub mod constellation;
pub mod windowing;