[webkit-reviews] review granted: [Bug 188195] Use static const global variable for TransformationMatrix instead of NeverDestroyed : [Attachment 346169] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 31 09:11:23 PDT 2018


Darin Adler <darin at apple.com> has granted Yusuke Suzuki
<utatane.tea at gmail.com>'s request for review:
Bug 188195: Use static const global variable for TransformationMatrix instead
of NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=188195

Attachment 346169: Patch

https://bugs.webkit.org/attachment.cgi?id=346169&action=review




--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 346169
  --> https://bugs.webkit.org/attachment.cgi?id=346169
Patch

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

> Source/WebCore/platform/graphics/GraphicsLayer.cpp:295
> +static const TransformationMatrix identityTransform { };

The braces here are OK, but not needed.

> Source/WebCore/platform/graphics/transforms/TransformationMatrix.h:119
> +    TransformationMatrix(const TransformationMatrix& t) { *this = t; }

I know this is just showing up in the patch because of changes the other other
nearby functions, but why is this needed? Isn’t this what the compiler will
generate if we don’t write a copy constructor explicitly? Same question about
the assignment operator below. Or maybe we do need to define these explicitly
but can use "= default".


More information about the webkit-reviews mailing list