mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
gfx: Make display lists serializable using serde
.
This commit introduces the `serde` dependency, which we will use to serialize messages going between processes in multiprocess Servo. This also adds a new debugging flag, `-Z print-display-list-json`, allowing the output of display list serialization to be visualized. This will be useful for our experiments with alternate rasterizers.
This commit is contained in:
parent
b6b95085fb
commit
6eacb0c995
30 changed files with 320 additions and 124 deletions
|
@ -24,4 +24,6 @@ log = "*"
|
|||
url = "0.2.35"
|
||||
hyper = "0.6"
|
||||
euclid = "0.1"
|
||||
serde = "*"
|
||||
serde_macros = "*"
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use util::vec::byte_swap;
|
|||
// FIXME: Images must not be copied every frame. Instead we should atomically
|
||||
// reference count them.
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum PixelFormat {
|
||||
K8, // Luminance channel only
|
||||
KA8, // Luminance + alpha
|
||||
|
@ -17,6 +18,7 @@ pub enum PixelFormat {
|
|||
RGBA8, // RGB + alpha, 8 bits per channel
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Image {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
|
|
|
@ -3,15 +3,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(custom_derive)]
|
||||
#![feature(plugin)]
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(step_by)]
|
||||
#![feature(vec_push_all)]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
extern crate euclid;
|
||||
extern crate hyper;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate png;
|
||||
extern crate serde;
|
||||
extern crate stb_image;
|
||||
extern crate url;
|
||||
extern crate util;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue