[Webkit-unassigned] [Bug 223173] Use references instead of pointers as animation wrapper function arguments in CSSPropertyAnimation.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 15 03:09:41 PDT 2021


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

--- Comment #1 from Antoine Quint <graouts at webkit.org> ---
Actually, looking at the code again:

    double aspectRatioDst = WebCore::blend(log(a->logicalAspectRatio()), log(b->logicalAspectRatio()), progress);
    dst->setAspectRatio(exp(aspectRatioDst), 1);
    dst->setAspectRatioType(progress < 0.5 ? a->aspectRatioType() : b->aspectRatioType());

Since in the discrete case the progress is either 0 or 1, I think the blend function could be just those three lines. While it's a bit extra work to actually blend the values when we know it'll be one or the other, it simplifies the logic.

That assumes that canInterpolate() will correctly identify all cases where the animation should be discrete, which is its contract.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210315/44658d85/attachment-0001.htm>


More information about the webkit-unassigned mailing list