Bug 219863

Summary: Simplify transform blending for simple cases
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+, ews-feeder: commit-queue-

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>