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
This commit is contained in:
Boris Chiou 2021-09-01 06:50:21 +00:00
Родитель 665aaf6ed6
Коммит 49b6e60550
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -1921,6 +1921,10 @@ pub extern "C" fn wr_transaction_append_dynamic_properties(
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),