Title: [234460] trunk/Source/WebCore
- Revision
- 234460
- Author
- [email protected]
- Date
- 2018-08-01 09:01:00 -0700 (Wed, 01 Aug 2018)
Log Message
Add TransformationMatrix::Identity
https://bugs.webkit.org/show_bug.cgi?id=188204
Reviewed by Simon Fraser.
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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (234459 => 234460)
--- trunk/Source/WebCore/ChangeLog 2018-08-01 15:47:59 UTC (rev 234459)
+++ trunk/Source/WebCore/ChangeLog 2018-08-01 16:01:00 UTC (rev 234460)
@@ -1,3 +1,21 @@
+2018-08-01 Yusuke Suzuki <[email protected]>
+
+ Add TransformationMatrix::Identity
+ https://bugs.webkit.org/show_bug.cgi?id=188204
+
+ Reviewed by Simon Fraser.
+
+ 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-08-01 Thibault Saunier <[email protected]>
[GStreamer] Make sure that first buffer running time is 0 in GStreamerMediaStreamSource
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (234459 => 234460)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2018-08-01 15:47:59 UTC (rev 234459)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2018-08-01 16:01:00 UTC (rev 234460)
@@ -292,11 +292,9 @@
}
}
-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 @@
const TransformationMatrix& GraphicsLayer::childrenTransform() const
{
- return m_childrenTransform ? *m_childrenTransform : identityTransform;
+ return m_childrenTransform ? *m_childrenTransform : TransformationMatrix::Identity;
}
void GraphicsLayer::setChildrenTransform(const TransformationMatrix& matrix)
Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp (234459 => 234460)
--- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp 2018-08-01 15:47:59 UTC (rev 234459)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp 2018-08-01 16:01:00 UTC (rev 234460)
@@ -70,6 +70,8 @@
const double SMALL_NUMBER = 1.e-8;
+const TransformationMatrix TransformationMatrix::Identity { };
+
// inverse(original_matrix, inverse_matrix)
//
// calculate the inverse of a 4x4 matrix
Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h (234459 => 234460)
--- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h 2018-08-01 15:47:59 UTC (rev 234459)
+++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h 2018-08-01 16:01:00 UTC (rev 234460)
@@ -118,6 +118,8 @@
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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes