Skip to content

Commit

Permalink
[threaded-animation-resolution] explicitly obtain ref-counted propert…
Browse files Browse the repository at this point in the history
…ies as references when blending

https://bugs.webkit.org/show_bug.cgi?id=270455

Reviewed by Dean Jackson.

Several properties of `AcceleratedEffectValues` are ref-counted and we access those when blending in `AcceleratedEffect`.
We don't currently mark those as references, so we should make it explicit since we don't want to increase the ref-counting.

* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
(WebCore::blend):

Canonical link: https://commits.webkit.org/275704@main
  • Loading branch information
graouts committed Mar 5, 2024
1 parent 839318c commit 308a69c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/WebCore/platform/animation/AcceleratedEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,15 @@ static void blend(AcceleratedEffectProperty property, AcceleratedEffectValues& o
break;
}
case AcceleratedEffectProperty::Translate:
if (auto toTranslate = to.translate)
if (auto& toTranslate = to.translate)
output.translate = toTranslate->blend(from.translate.get(), blendingContext);
break;
case AcceleratedEffectProperty::Rotate:
if (auto toRotate = to.rotate)
if (auto& toRotate = to.rotate)
output.rotate = toRotate->blend(from.rotate.get(), blendingContext);
break;
case AcceleratedEffectProperty::Scale:
if (auto toScale = to.scale)
if (auto& toScale = to.scale)
output.scale = toScale->blend(from.scale.get(), blendingContext);
break;
case AcceleratedEffectProperty::OffsetAnchor:
Expand Down

0 comments on commit 308a69c

Please sign in to comment.