зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1512678 - Simplify handling of previousBaseStyles in KeyframeEffect::EnsureBaseStyles; r=hiro
This should avoid a sometimes unnecessary heaps allocation and also avoids the possibility of having a "none" previousBaseStyles. Differential Revision: https://phabricator.services.mozilla.com/D13984 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
22c96f2cb4
Коммит
1a15db9fdd
|
@ -374,9 +374,9 @@ void KeyframeEffect::EnsureBaseStyles(
|
|||
return;
|
||||
}
|
||||
|
||||
Maybe<BaseValuesHashmap> previousBaseStyles;
|
||||
BaseValuesHashmap previousBaseStyles;
|
||||
if (aBaseStylesChanged != nullptr) {
|
||||
previousBaseStyles.emplace(std::move(mBaseValues));
|
||||
previousBaseStyles = std::move(mBaseValues);
|
||||
}
|
||||
|
||||
mBaseValues.Clear();
|
||||
|
@ -405,7 +405,7 @@ void KeyframeEffect::EnsureBaseStyles(
|
|||
if (aBaseStylesChanged != nullptr) {
|
||||
for (auto iter = mBaseValues.Iter(); !iter.Done(); iter.Next()) {
|
||||
if (AnimationValue(iter.Data()) !=
|
||||
AnimationValue(previousBaseStyles->Get(iter.Key()))) {
|
||||
AnimationValue(previousBaseStyles.Get(iter.Key()))) {
|
||||
*aBaseStylesChanged = true;
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче