WebKit Bugzilla
Attachment 346265 Details for
Bug 188204
: Add TransformationMatrix::Identity
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188204-20180801172317.patch (text/plain), 3.48 KB, created by
Yusuke Suzuki
on 2018-08-01 01:23:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-08-01 01:23:18 PDT
Size:
3.48 KB
patch
obsolete
>Subversion Revision: 234434 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a8fb1912198bfab0f4cf6dd072e03e181047cdfb..1e1c0eb81875c4a87a26ea52364e3637b0905388 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-08-01 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ Add TransformationMatrix::Identity >+ https://bugs.webkit.org/show_bug.cgi?id=188204 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch adds TransformationMatrix::Identity, which is a static const variable holding an identity matrix. >+ >+ No behavior change. >+ >+ * platform/graphics/GraphicsLayer.cpp: >+ (WebCore::GraphicsLayer::transform const): >+ (WebCore::GraphicsLayer::childrenTransform const): >+ (): Deleted. >+ * platform/graphics/transforms/TransformationMatrix.cpp: >+ * platform/graphics/transforms/TransformationMatrix.h: >+ > 2018-07-31 Yusuke Suzuki <utatane.tea@gmail.com> > > Clean up TransformationMatrix implementation >diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.cpp b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >index 38c034a37a187750659ea2765a97a05f44607dfc..22789f22041f0c1f909ac1fa0f8c47f260cf6eb2 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >@@ -292,11 +292,9 @@ void GraphicsLayer::removeFromParent() > } > } > >-static const TransformationMatrix identityTransform { }; >- > const TransformationMatrix& GraphicsLayer::transform() const > { >- return m_transform ? *m_transform : identityTransform; >+ return m_transform ? *m_transform : TransformationMatrix::Identity; > } > > void GraphicsLayer::setTransform(const TransformationMatrix& matrix) >@@ -309,7 +307,7 @@ void GraphicsLayer::setTransform(const TransformationMatrix& matrix) > > const TransformationMatrix& GraphicsLayer::childrenTransform() const > { >- return m_childrenTransform ? *m_childrenTransform : identityTransform; >+ return m_childrenTransform ? *m_childrenTransform : TransformationMatrix::Identity; > } > > void GraphicsLayer::setChildrenTransform(const TransformationMatrix& matrix) >diff --git a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp >index 1414e61deef93423ac99577d6c52f8933d6ea693..46cf36710a315e406104329e9bf8812561a6c2ef 100644 >--- a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp >+++ b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp >@@ -70,6 +70,8 @@ typedef double Vector3[3]; > > const double SMALL_NUMBER = 1.e-8; > >+const TransformationMatrix TransformationMatrix::Identity { }; >+ > // inverse(original_matrix, inverse_matrix) > // > // calculate the inverse of a 4x4 matrix >diff --git a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h >index 12428260e7f421675d5865c826bd1a07876d2e3c..850bcfa7c633797748eadb098c9c00d88c3717fa 100644 >--- a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h >+++ b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h >@@ -118,6 +118,8 @@ class TransformationMatrix { > > WEBCORE_EXPORT TransformationMatrix(const AffineTransform&); > >+ static const TransformationMatrix Identity; >+ > void setMatrix(double a, double b, double c, double d, double e, double f) > { > m_matrix[0][0] = a; m_matrix[0][1] = b; m_matrix[0][2] = 0; m_matrix[0][3] = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188204
:
346191
| 346265