Clean up TransformationMatrix implementation
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2018 18:37:18 +0000 (18:37 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2018 18:37:18 +0000 (18:37 +0000)
commit28495a26c2a40912c0252e4f943aec8143dec06f
tree9e30066d0f839597d213963da9d3f4e4b40ec802
parentc38806ea6bc06c9c9c1beb0d41e2f5499ea7acf6
Clean up TransformationMatrix implementation
https://bugs.webkit.org/show_bug.cgi?id=188197

Reviewed by Simon Fraser.

We perform cleaning up of TransformationMatrix.

1. We drop user-defined operator= and copy constructor. Default ones works well for TransformationMatrix.
2. Remove unused setMatrix. We explicitly use memcpy in TransformationMatrix.cpp (only one place).
3. Use memcmp for implementing operator==.

In (2) and (3), we use `memcpy(&matrix[0][0], &tmp[0][0], sizeof(Matrix4))` instead of `memcpy(matrix, tmp, sizeof(Matrix4))`,
since they both are non nullptr and the former is easier to understand.

* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::multiply):
* platform/graphics/transforms/TransformationMatrix.h:
(WebCore::TransformationMatrix::setMatrix):
(WebCore::TransformationMatrix::operator== const):
(WebCore::TransformationMatrix::operator =): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
Source/WebCore/platform/graphics/transforms/TransformationMatrix.h