mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to reroute the task creation to the pipeline or the compositor. But this works as a first step.
This commit is contained in:
parent
886c08c393
commit
bb99b2f3c8
39 changed files with 694 additions and 365 deletions
|
@ -13,6 +13,9 @@ path = "../style"
|
|||
[dependencies.util]
|
||||
path = "../util"
|
||||
|
||||
[dependencies.canvas_traits]
|
||||
path = "../canvas_traits"
|
||||
|
||||
[dependencies.azure]
|
||||
git = "https://github.com/servo/rust-azure"
|
||||
|
||||
|
@ -34,6 +37,10 @@ features = [ "serde_serialization" ]
|
|||
[dependencies.ipc-channel]
|
||||
git = "https://github.com/pcwalton/ipc-channel"
|
||||
|
||||
[dependencies.offscreen_gl_context]
|
||||
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
|
||||
features = ["texture_surface"]
|
||||
|
||||
[dependencies]
|
||||
bitflags = "0.3"
|
||||
rustc-serialize = "0.3.4"
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
|
||||
use compositor_msg::Epoch;
|
||||
|
||||
use canvas_traits::CanvasMsg;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::size::TypedSize2D;
|
||||
use euclid::size::{Size2D, TypedSize2D};
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use hyper::header::Headers;
|
||||
use hyper::method::Method;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layers::geometry::DevicePixel;
|
||||
use offscreen_gl_context::GLContextAttributes;
|
||||
use png::Image;
|
||||
use util::cursor::Cursor;
|
||||
use util::geometry::{PagePx, ViewportPx};
|
||||
|
@ -257,6 +259,14 @@ pub enum Msg {
|
|||
NewFavicon(Url),
|
||||
/// <head> tag finished parsing
|
||||
HeadParsed,
|
||||
/// Requests that a new 2D canvas thread be created. (This is done in the constellation because
|
||||
/// 2D canvases may use the GPU and we don't want to give untrusted content access to the GPU.)
|
||||
CreateCanvasPaintTask(Size2D<i32>, IpcSender<(IpcSender<CanvasMsg>, usize)>),
|
||||
/// Requests that a new WebGL thread be created. (This is done in the constellation because
|
||||
/// WebGL uses the GPU and we don't want to give untrusted content access to the GPU.)
|
||||
CreateWebGLPaintTask(Size2D<i32>,
|
||||
GLContextAttributes,
|
||||
IpcSender<(IpcSender<CanvasMsg>, usize)>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, Deserialize, Serialize)]
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
|
||||
extern crate azure;
|
||||
#[macro_use] extern crate bitflags;
|
||||
extern crate canvas_traits;
|
||||
extern crate euclid;
|
||||
extern crate hyper;
|
||||
extern crate ipc_channel;
|
||||
extern crate layers;
|
||||
extern crate offscreen_gl_context;
|
||||
extern crate png;
|
||||
extern crate rustc_serialize;
|
||||
extern crate serde;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue