Bug 1676789 - No need to append omta properties if they are empty. r=hiro
authorBoris Chiou <boris.chiou@gmail.com>
Wed, 01 Sep 2021 06:50:21 +0000
changeset 590432 f4ad9b76e5f8ca0586466fe8c8a373c6c33d0f41
parent 590431 202c42992775f3b8e36d0b31591de977cd720bef
child 590433 2a4b0e5b3079bbb432a520bb558521024a3f1f0c
push id148950
push userbchiou@mozilla.com
push dateWed, 01 Sep 2021 06:52:54 +0000
treeherderautoland@f4ad9b76e5f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1676789
milestone93.0a1
first release with
nightly linux32
f4ad9b76e5f8 / 93.0a1 / 20210901091701 / files
nightly linux64
f4ad9b76e5f8 / 93.0a1 / 20210901091701 / files
nightly mac
f4ad9b76e5f8 / 93.0a1 / 20210901091701 / files
nightly win32
f4ad9b76e5f8 / 93.0a1 / 20210901091701 / files
nightly win64
f4ad9b76e5f8 / 93.0a1 / 20210901091701 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1676789 - No need to append omta properties if they are empty. r=hiro Now we always reset the properties for each transaction, so no need to append/update if these vectors are empty. Differential Revision: https://phabricator.services.mozilla.com/D124142
gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1916,16 +1916,20 @@ pub extern "C" fn wr_transaction_append_
     txn: &mut Transaction,
     opacity_array: *const WrOpacityProperty,
     opacity_count: usize,
     transform_array: *const WrTransformProperty,
     transform_count: usize,
     color_array: *const WrColorProperty,
     color_count: usize,
 ) {
+    if opacity_count == 0 && transform_count == 0 && color_count == 0 {
+        return;
+    }
+
     let mut properties = DynamicProperties {
         transforms: Vec::with_capacity(transform_count),
         floats: Vec::with_capacity(opacity_count),
         colors: Vec::with_capacity(color_count),
     };
 
     wr_animation_properties_into_vec(transform_array, transform_count, &mut properties.transforms);