Changeset 126352 in webkit
- Timestamp:
- Aug 22, 2012 2:29:05 PM (12 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r126351 r126352 1 2012-08-22 Nikhil Bhargava <nbhargava@google.com> 2 3 Speed up compilation of tests involving WebTransformationMatrix 4 https://bugs.webkit.org/show_bug.cgi?id=94639 5 6 Reviewed by James Robinson. 7 8 EXPECT_TRANSFORMATION_MATRIX_EQ was changed to become mainly a function. 9 As a macro that expanded into 16 other macros, it caused an unneeded 10 slow down of close to 45s in the compile time of CCLayerTreeHostCommonTest 11 Bugs have been filed to clang and gcc noting the errant behavior: 12 http://llvm.org/bugs/show_bug.cgi?id=13651 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54337 13 14 * tests/CCLayerTreeHostCommonTest.cpp: 15 * tests/CCLayerTreeTestCommon.h: 16 (WebKitTests): 17 (WebKitTests::ExpectTransformationMatrixEq): 18 * tests/WebTransformOperationsTest.cpp: 19 (TEST): 20 (checkProgress): 21 * tests/WebTransformationMatrixTest.cpp: 22 (WebKit::TEST): 23 1 24 2012-08-22 Alexandre Elias <aelias@google.com> 2 25 -
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
r125932 r126352 47 47 using WebKit::WebTransformationMatrix; 48 48 49 void WebKitTests::ExpectTransformationMatrixEq(WebTransformationMatrix expected, 50 WebTransformationMatrix actual) 51 { 52 EXPECT_FLOAT_EQ((expected).m11(), (actual).m11()); 53 EXPECT_FLOAT_EQ((expected).m12(), (actual).m12()); 54 EXPECT_FLOAT_EQ((expected).m13(), (actual).m13()); 55 EXPECT_FLOAT_EQ((expected).m14(), (actual).m14()); 56 EXPECT_FLOAT_EQ((expected).m21(), (actual).m21()); 57 EXPECT_FLOAT_EQ((expected).m22(), (actual).m22()); 58 EXPECT_FLOAT_EQ((expected).m23(), (actual).m23()); 59 EXPECT_FLOAT_EQ((expected).m24(), (actual).m24()); 60 EXPECT_FLOAT_EQ((expected).m31(), (actual).m31()); 61 EXPECT_FLOAT_EQ((expected).m32(), (actual).m32()); 62 EXPECT_FLOAT_EQ((expected).m33(), (actual).m33()); 63 EXPECT_FLOAT_EQ((expected).m34(), (actual).m34()); 64 EXPECT_FLOAT_EQ((expected).m41(), (actual).m41()); 65 EXPECT_FLOAT_EQ((expected).m42(), (actual).m42()); 66 EXPECT_FLOAT_EQ((expected).m43(), (actual).m43()); 67 EXPECT_FLOAT_EQ((expected).m44(), (actual).m44()); 68 } 69 49 70 namespace { 50 71 -
trunk/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h
r119178 r126352 26 26 #define CCLayerTreeTestCommon_h 27 27 28 #include <public/WebTransformationMatrix.h> 29 28 30 namespace WebKitTests { 29 31 … … 41 43 EXPECT_EQ((expected).size().height(), (actual).size().height()) 42 44 43 // This is a macro instead of a function so that we get useful line numbers where a test failed. 44 // Even though WebTransformationMatrix values are double precision, there are many other floating-point values used that affect 45 // the transforms, and so we only expect them to be accurate up to floating-point precision. 46 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ 47 EXPECT_FLOAT_EQ((expected).m11(), (actual).m11()); \ 48 EXPECT_FLOAT_EQ((expected).m12(), (actual).m12()); \ 49 EXPECT_FLOAT_EQ((expected).m13(), (actual).m13()); \ 50 EXPECT_FLOAT_EQ((expected).m14(), (actual).m14()); \ 51 EXPECT_FLOAT_EQ((expected).m21(), (actual).m21()); \ 52 EXPECT_FLOAT_EQ((expected).m22(), (actual).m22()); \ 53 EXPECT_FLOAT_EQ((expected).m23(), (actual).m23()); \ 54 EXPECT_FLOAT_EQ((expected).m24(), (actual).m24()); \ 55 EXPECT_FLOAT_EQ((expected).m31(), (actual).m31()); \ 56 EXPECT_FLOAT_EQ((expected).m32(), (actual).m32()); \ 57 EXPECT_FLOAT_EQ((expected).m33(), (actual).m33()); \ 58 EXPECT_FLOAT_EQ((expected).m34(), (actual).m34()); \ 59 EXPECT_FLOAT_EQ((expected).m41(), (actual).m41()); \ 60 EXPECT_FLOAT_EQ((expected).m42(), (actual).m42()); \ 61 EXPECT_FLOAT_EQ((expected).m43(), (actual).m43()); \ 62 EXPECT_FLOAT_EQ((expected).m44(), (actual).m44()) 45 // This is a function rather than a macro because when this is included as a macro 46 // in bulk, it causes a significant slow-down in compilation time. This problem 47 // exists with both gcc and clang, and bugs have been filed at 48 // http://llvm.org/bugs/show_bug.cgi?id=13651 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54337 49 void ExpectTransformationMatrixEq(WebKit::WebTransformationMatrix expected, 50 WebKit::WebTransformationMatrix actual); 51 52 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ 53 { \ 54 SCOPED_TRACE(""); \ 55 WebKitTests::ExpectTransformationMatrixEq(expected, actual); \ 56 } 63 57 64 58 } // namespace
Note: See TracChangeset
for help on using the changeset viewer.