Bug 1377894 - Create the new opacity animations only when the animation id is valid, r?kats
MozReview-Commit-ID: 1njXoEnyj00
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1167,17 +1167,19 @@ pub extern "C" fn wr_dp_push_stacking_co
}).collect();
let opacity = unsafe { opacity.as_ref() };
if let Some(opacity) = opacity {
if *opacity < 1.0 {
filters.push(FilterOp::Opacity(PropertyBinding::Value(*opacity)));
}
} else {
- filters.push(FilterOp::Opacity(PropertyBinding::Binding(PropertyBindingKey::new(animation_id))));
+ if animation_id > 0 {
+ filters.push(FilterOp::Opacity(PropertyBinding::Binding(PropertyBindingKey::new(animation_id))));
+ }
}
let transform = unsafe { transform.as_ref() };
let transform_binding = match animation_id {
0 => match transform {
Some(transform) => Some(PropertyBinding::Value(transform.clone())),
None => None,
},