Changeset 167017 in webkit
- Timestamp:
- Apr 9, 2014 10:05:18 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167016 r167017 1 2014-04-09 Anders Carlsson <andersca@apple.com> 2 3 Use std::array in AffineTransform, and get rid of setMatrix 4 https://bugs.webkit.org/show_bug.cgi?id=131416 5 6 Reviewed by Sam Weinig. 7 8 * platform/graphics/transforms/AffineTransform.cpp: 9 (WebCore::AffineTransform::AffineTransform): 10 (WebCore::AffineTransform::multiply): 11 * platform/graphics/transforms/AffineTransform.h: 12 (WebCore::AffineTransform::setMatrix): Deleted. 13 1 14 2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com> 2 15 -
trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
r166989 r167017 39 39 40 40 AffineTransform::AffineTransform() 41 { 42 setMatrix(1, 0, 0, 1, 0, 0); 41 : m_transform { { 1, 0, 0, 1, 0, 0 } } 42 { 43 43 } 44 44 45 45 AffineTransform::AffineTransform(double a, double b, double c, double d, double e, double f) 46 { 47 setMatrix(a, b, c, d, e, f); 46 : m_transform { { a, b, c, d, e, f } } 47 { 48 48 } 49 49 … … 131 131 trans.m_transform[5] = other.m_transform[4] * m_transform[1] + other.m_transform[5] * m_transform[3] + m_transform[5]; 132 132 133 setMatrix(trans.m_transform);133 *this = trans; 134 134 return *this; 135 135 } -
trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h
r165676 r167017 28 28 #define AffineTransform_h 29 29 30 #include < string.h> // for memcpy30 #include <array> 31 31 #include <wtf/FastMalloc.h> 32 32 … … 51 51 WTF_MAKE_FAST_ALLOCATED; 52 52 public: 53 typedef double Transform[6];54 55 53 AffineTransform(); 56 54 AffineTransform(double a, double b, double c, double d, double e, double f); … … 188 186 189 187 private: 190 void setMatrix(const Transform m) 191 { 192 if (m && m != m_transform) 193 memcpy(m_transform, m, sizeof(Transform)); 194 } 195 196 Transform m_transform; 188 std::array<double, 6> m_transform; 197 189 }; 198 190
Note: See TracChangeset
for help on using the changeset viewer.