mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Bug 1335942 - Part 2: Support GetOpacity FFI. r=manishearth
This commit is contained in:
parent
c7dc3e4008
commit
22d04e1a16
2 changed files with 17 additions and 0 deletions
|
@ -205,6 +205,18 @@ pub extern "C" fn Servo_AnimationValues_Uncompute(value: RawServoAnimationValueB
|
|||
})).into_strong()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_AnimationValues_GetOpacity(value: RawServoAnimationValueBorrowed)
|
||||
-> f32
|
||||
{
|
||||
let value = AnimationValue::as_arc(&value);
|
||||
if let AnimationValue::Opacity(opacity) = **value {
|
||||
opacity
|
||||
} else {
|
||||
panic!("The AnimationValue should be Opacity");
|
||||
}
|
||||
}
|
||||
|
||||
/// Takes a ServoAnimationValues and populates it with the animation values corresponding
|
||||
/// to a given property declaration block
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue