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 Source-Repo: https://github.com/servo/servo Source-Revision: ad53e95080144485e74cd9b9d48ce75e20de4e36
100 lines
2.0 KiB
Rust
100 lines
2.0 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(alloc)]
|
|
#![feature(box_syntax)]
|
|
#![feature(collections)]
|
|
#![feature(core)]
|
|
#![feature(filling_drop)]
|
|
#![feature(plugin)]
|
|
#![feature(rustc_private)]
|
|
#![feature(std_misc)]
|
|
#![feature(str_char)]
|
|
#![feature(thread_local)]
|
|
#![feature(unsafe_no_drop_flag)]
|
|
|
|
#![deny(unsafe_code)]
|
|
#![allow(unrooted_must_root)]
|
|
|
|
#![plugin(string_cache_plugin)]
|
|
#![plugin(plugins)]
|
|
|
|
#[macro_use]
|
|
extern crate log;
|
|
|
|
#[macro_use]
|
|
extern crate bitflags;
|
|
|
|
#[macro_use]
|
|
#[no_link]
|
|
extern crate plugins as servo_plugins;
|
|
extern crate net_traits;
|
|
#[macro_use]
|
|
extern crate profile_traits;
|
|
|
|
#[macro_use]
|
|
extern crate util;
|
|
|
|
extern crate rustc_serialize;
|
|
extern crate alloc;
|
|
extern crate azure;
|
|
extern crate canvas_traits;
|
|
extern crate clock_ticks;
|
|
extern crate collections;
|
|
extern crate cssparser;
|
|
extern crate encoding;
|
|
extern crate geom;
|
|
extern crate gfx;
|
|
extern crate gfx_traits;
|
|
extern crate layout_traits;
|
|
extern crate libc;
|
|
extern crate msg;
|
|
extern crate png;
|
|
extern crate script;
|
|
extern crate script_traits;
|
|
extern crate selectors;
|
|
extern crate string_cache;
|
|
extern crate style;
|
|
extern crate url;
|
|
|
|
// Listed first because of macro definitions
|
|
pub mod layout_debug;
|
|
|
|
pub mod animation;
|
|
pub mod block;
|
|
pub mod construct;
|
|
pub mod context;
|
|
pub mod data;
|
|
pub mod display_list_builder;
|
|
pub mod floats;
|
|
pub mod flow;
|
|
pub mod flow_list;
|
|
pub mod flow_ref;
|
|
pub mod fragment;
|
|
pub mod generated_content;
|
|
pub mod layout_task;
|
|
pub mod incremental;
|
|
pub mod inline;
|
|
pub mod list_item;
|
|
pub mod model;
|
|
pub mod multicol;
|
|
pub mod opaque_node;
|
|
pub mod parallel;
|
|
pub mod sequential;
|
|
pub mod table_wrapper;
|
|
pub mod table;
|
|
pub mod table_caption;
|
|
pub mod table_colgroup;
|
|
pub mod table_rowgroup;
|
|
pub mod table_row;
|
|
pub mod table_cell;
|
|
pub mod text;
|
|
pub mod traversal;
|
|
pub mod wrapper;
|
|
|
|
pub mod css {
|
|
pub mod matching;
|
|
pub mod node_style;
|
|
}
|