Make the mesh library serializable and deserializable.

This is needed for the new WebRender infrastructure.
This commit is contained in:
Patrick Walton 2018-03-06 15:12:36 -08:00
parent 18121208d4
commit 6c2c34aa3c
2 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ pub(crate) enum BVertexKind {
ConcaveControlPoint,
}
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
#[repr(C)]
pub struct BVertexLoopBlinnData {
pub tex_coord: [u8; 2],

View File

@ -23,7 +23,7 @@ use std::u32;
use {BQuad, BQuadVertexPositions, BVertexLoopBlinnData};
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MeshLibrary {
pub path_ranges: Vec<PathRanges>,
pub b_quads: Vec<BQuad>,
@ -424,7 +424,7 @@ pub(crate) struct MeshLibraryLengths {
b_boxes: u32,
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct PathRanges {
pub b_quads: Range<u32>,
pub b_quad_vertex_positions: Range<u32>,