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

Side by Side Diff: cc/test/geometry_test_utils.h

Issue 11570027: Adding support for per vertex opacity on textured layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing unittest Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_GEOMETRY_TEST_UTILS_H_ 5 #ifndef CC_TEST_GEOMETRY_TEST_UTILS_H_
6 #define CC_TEST_GEOMETRY_TEST_UTILS_H_ 6 #define CC_TEST_GEOMETRY_TEST_UTILS_H_
7 7
8 namespace gfx { 8 namespace gfx {
9 class Transform; 9 class Transform;
10 } 10 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 EXPECT_EQ((expected).x(), (actual).x()); \ 43 EXPECT_EQ((expected).x(), (actual).x()); \
44 EXPECT_EQ((expected).y(), (actual).y()); \ 44 EXPECT_EQ((expected).y(), (actual).y()); \
45 } while (false) 45 } while (false)
46 46
47 #define EXPECT_VECTOR_EQ(expected, actual) \ 47 #define EXPECT_VECTOR_EQ(expected, actual) \
48 do { \ 48 do { \
49 EXPECT_EQ((expected).x(), (actual).x()); \ 49 EXPECT_EQ((expected).x(), (actual).x()); \
50 EXPECT_EQ((expected).y(), (actual).y()); \ 50 EXPECT_EQ((expected).y(), (actual).y()); \
51 } while (false) 51 } while (false)
52 52
53 #define EXPECT_FLOAT_ARRAY_EQ(expected, actual, count) \
54 do { \
55 for (int i = 0; i < count; i++) {\
56 EXPECT_FLOAT_EQ((expected)[i], (actual)[i]); \
57 }\
58 } while (false)
59
53 // This is a function rather than a macro because when this is included as a mac ro 60 // This is a function rather than a macro because when this is included as a mac ro
54 // in bulk, it causes a significant slow-down in compilation time. This problem 61 // in bulk, it causes a significant slow-down in compilation time. This problem
55 // exists with both gcc and clang, and bugs have been filed at 62 // exists with both gcc and clang, and bugs have been filed at
56 // http://llvm.org/bugs/show_bug.cgi?id=13651 and http://gcc.gnu.org/bugzilla/sh ow_bug.cgi?id=54337 63 // http://llvm.org/bugs/show_bug.cgi?id=13651 and http://gcc.gnu.org/bugzilla/sh ow_bug.cgi?id=54337
57 void ExpectTransformationMatrixEq(const gfx::Transform& expected, 64 void ExpectTransformationMatrixEq(const gfx::Transform& expected,
58 const gfx::Transform& actual); 65 const gfx::Transform& actual);
59 66
60 void ExpectTransformationMatrixEq(const WebKit::WebTransformationMatrix& expecte d, 67 void ExpectTransformationMatrixEq(const WebKit::WebTransformationMatrix& expecte d,
61 const WebKit::WebTransformationMatrix& actual) ; 68 const WebKit::WebTransformationMatrix& actual) ;
62 69
63 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ 70 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \
64 { \ 71 { \
65 SCOPED_TRACE(""); \ 72 SCOPED_TRACE(""); \
66 WebKitTests::ExpectTransformationMatrixEq(expected, actual); \ 73 WebKitTests::ExpectTransformationMatrixEq(expected, actual); \
67 } 74 }
68 75
69 } // namespace WebKitTests 76 } // namespace WebKitTests
70 77
71 #endif // CC_TEST_GEOMETRY_TEST_UTILS_H_ 78 #endif // CC_TEST_GEOMETRY_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698