Bug 219863 - Simplify transform blending for simple cases
Summary: Simplify transform blending for simple cases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-14 11:11 PST by Antoine Quint
Modified: 2020-12-14 15:50 PST (History)
3 users (show)

See Also:


Attachments
Patch (27.32 KB, patch)
2020-12-14 11:16 PST, Antoine Quint
simon.fraser: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2020-12-14 11:11:23 PST
Simplify transform blending for simple cases
Comment 1 Antoine Quint 2020-12-14 11:16:01 PST
Created attachment 416176 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-12-14 11:20:40 PST
Comment on attachment 416176 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416176&action=review

> Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:952
> +    if (!fmod(angle, 360))

std::fmod or std::fmod<double>

> Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:1675
> +        for (size_t x = 0; x < 4; ++x) {
> +            for (size_t y = 0; y < 4; ++y)
> +                m_matrix[x][y] = from.m_matrix[x][y];
> +        }

You can just do *this = from here.
Comment 3 Antoine Quint 2020-12-14 11:25:29 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 416176 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=416176&action=review
> 
> > Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:952
> > +    if (!fmod(angle, 360))
> 
> std::fmod or std::fmod<double>

Will fix in commit.

> > Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:1675
> > +        for (size_t x = 0; x < 4; ++x) {
> > +            for (size_t y = 0; y < 4; ++y)
> > +                m_matrix[x][y] = from.m_matrix[x][y];
> > +        }
> 
> You can just do *this = from here.

That's excellent, I was hoping there was a better way!
Comment 4 Antoine Quint 2020-12-14 12:56:06 PST
Committed r270801: <https://trac.webkit.org/changeset/270801>
Comment 5 Radar WebKit Bug Importer 2020-12-14 12:57:16 PST
<rdar://problem/72310251>