Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: third_party/WebKit/Source/platform/transforms/AffineTransform.cpp

Issue 1996543002: Avoid using forced layout to trigger paint invalidation for SVG containers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TE updates Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/AffineTransform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
diff --git a/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp b/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
index 5bfbd0e2d4c6727a750fa9f35f5394755833ddee..3f08a99d8293c271b4edd0f4c4b327cbfcf434be 100644
--- a/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
+++ b/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
@@ -68,14 +68,24 @@ bool AffineTransform::isIdentity() const
&& m_transform[4] == 0 && m_transform[5] == 0);
}
+double AffineTransform::xScaleSquared() const
+{
+ return m_transform[0] * m_transform[0] + m_transform[1] * m_transform[1];
+}
+
double AffineTransform::xScale() const
{
- return sqrt(m_transform[0] * m_transform[0] + m_transform[1] * m_transform[1]);
+ return sqrt(xScaleSquared());
+}
+
+double AffineTransform::yScaleSquared() const
+{
+ return m_transform[2] * m_transform[2] + m_transform[3] * m_transform[3];
}
double AffineTransform::yScale() const
{
- return sqrt(m_transform[2] * m_transform[2] + m_transform[3] * m_transform[3]);
+ return sqrt(yScaleSquared());
}
double AffineTransform::det() const
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/AffineTransform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698