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:
Patrick Walton 2015-07-08 16:15:23 -07:00
parent b6b95085fb
commit 6eacb0c995
30 changed files with 320 additions and 124 deletions

View file

@ -14,7 +14,7 @@ use std::sync::Arc;
use text::glyph::{CharIndex, GlyphStore};
/// A single "paragraph" of text in one font size and style.
#[derive(Clone)]
#[derive(Clone, Deserialize, Serialize)]
pub struct TextRun {
/// The UTF-8 string represented by this text run.
pub text: Arc<String>,
@ -26,7 +26,7 @@ pub struct TextRun {
}
/// A single series of glyphs within a text run.
#[derive(Clone)]
#[derive(Clone, Deserialize, Serialize)]
pub struct GlyphRun {
/// The glyphs.
pub glyph_store: Arc<GlyphStore>,