Bug 1377894 - Create the new opacity animations only when the animation id is valid, r=kats
authorpeter chang <pchang@mozilla.com>
Mon, 02 Oct 2017 21:49:21 +0800 (2017-10-02)
changeset 384101 b7a2d0f49c4c931e02e5250aacf3dd48a53664eb
parent 384100 e6fd9d522e93bc9dd59e3cdb9dbb16c63a7f3cda
child 384102 141096343631b51eeb22501095e276d6cc75714c
push id32619
push userarchaeopteryx@coole-files.de
push dateTue, 03 Oct 2017 09:41:33 +0000 (2017-10-03)
treeherdermozilla-central@14841c4d8a97 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1377894
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1377894 - Create the new opacity animations only when the animation id is valid, r=kats MozReview-Commit-ID: 1njXoEnyj00
gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1139,17 +1139,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,
         },