mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Use serde to serialize LengthPercentage and StyleRayFunction.
We need to pass these two types into the compositor, so we need a better way to serialize these rust types. We use serde and bincode to serialize/deserialize them, and use ByteBuf to pass the &[u8] data through IPC. We define StyleVecU8 for FFI usage only. Differential Revision: https://phabricator.services.mozilla.com/D50688
This commit is contained in:
parent
d99606a841
commit
40ede5bacb
8 changed files with 18 additions and 8 deletions
|
@ -13,16 +13,17 @@ use std::{f32, f64};
|
|||
use style_traits::{CssWriter, ToCss};
|
||||
|
||||
/// A computed angle in degrees.
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(
|
||||
Add,
|
||||
Animate,
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Deserialize,
|
||||
MallocSizeOf,
|
||||
PartialEq,
|
||||
PartialOrd,
|
||||
Serialize,
|
||||
ToAnimatedZero,
|
||||
ToResolvedValue,
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue