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

Side by Side Diff: ui/gfx/test/gfx_util.h

Issue 2563743004: [3/5] Add translated rasterization support for RasterBuffer & below (Closed)
Patch Set: rebase & fix last nits Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/geometry/axis_transform2d_unittest.cc ('k') | ui/gfx/test/gfx_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_GFX_TEST_GFX_UTIL_H_ 5 #ifndef UI_GFX_TEST_GFX_UTIL_H_
6 #define UI_GFX_TEST_GFX_UTIL_H_ 6 #define UI_GFX_TEST_GFX_UTIL_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/skia/include/core/SkColor.h" 12 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/gfx/geometry/box_f.h"
14 #include "ui/gfx/geometry/rect_f.h"
15 13
16 namespace gfx { 14 namespace gfx {
17 15
18 // Checks that the box coordinates are each almost equal floats. 16 class AxisTransform2d;
17 class BoxF;
18 class PointF;
19 class RectF;
20
21 #define EXPECT_AXIS_TRANSFORM2D_EQ(a, b) \
22 EXPECT_PRED_FORMAT2(::gfx::AssertAxisTransform2dFloatEqual, a, b)
23
24 ::testing::AssertionResult AssertAxisTransform2dFloatEqual(
25 const char* lhs_expr,
26 const char* rhs_expr,
27 const AxisTransform2d& lhs,
28 const AxisTransform2d& rhs);
29
19 #define EXPECT_BOXF_EQ(a, b) \ 30 #define EXPECT_BOXF_EQ(a, b) \
20 EXPECT_PRED_FORMAT2(::gfx::AssertBoxFloatEqual, a, b) 31 EXPECT_PRED_FORMAT2(::gfx::AssertBoxFloatEqual, a, b)
21 32
22 ::testing::AssertionResult AssertBoxFloatEqual(const char* lhs_expr, 33 ::testing::AssertionResult AssertBoxFloatEqual(const char* lhs_expr,
23 const char* rhs_expr, 34 const char* rhs_expr,
24 const BoxF& lhs, 35 const BoxF& lhs,
25 const BoxF& rhs); 36 const BoxF& rhs);
26 37
38 #define EXPECT_POINTF_EQ(a, b) \
39 EXPECT_PRED_FORMAT2(::gfx::AssertPointFloatEqual, a, b)
40
41 ::testing::AssertionResult AssertPointFloatEqual(const char* lhs_expr,
42 const char* rhs_expr,
43 const PointF& lhs,
44 const PointF& rhs);
45
27 #define EXPECT_RECTF_EQ(a, b) \ 46 #define EXPECT_RECTF_EQ(a, b) \
28 EXPECT_PRED_FORMAT2(::gfx::AssertRectFloatEqual, a, b) 47 EXPECT_PRED_FORMAT2(::gfx::AssertRectFloatEqual, a, b)
29 48
30 ::testing::AssertionResult AssertRectFloatEqual(const char* lhs_expr, 49 ::testing::AssertionResult AssertRectFloatEqual(const char* lhs_expr,
31 const char* rhs_expr, 50 const char* rhs_expr,
32 const RectF& lhs, 51 const RectF& lhs,
33 const RectF& rhs); 52 const RectF& rhs);
34 53
35 #define EXPECT_SKCOLOR_EQ(a, b) \ 54 #define EXPECT_SKCOLOR_EQ(a, b) \
36 EXPECT_PRED_FORMAT2(::gfx::AssertSkColorsEqual, a, b) 55 EXPECT_PRED_FORMAT2(::gfx::AssertSkColorsEqual, a, b)
37 56
38 ::testing::AssertionResult AssertSkColorsEqual(const char* lhs_expr, 57 ::testing::AssertionResult AssertSkColorsEqual(const char* lhs_expr,
39 const char* rhs_expr, 58 const char* rhs_expr,
40 SkColor lhs, 59 SkColor lhs,
41 SkColor rhs); 60 SkColor rhs);
42 61
43 } // namespace gfx 62 } // namespace gfx
44 63
45 #endif // UI_GFX_TEST_GFX_UTIL_H_ 64 #endif // UI_GFX_TEST_GFX_UTIL_H_
OLDNEW
« no previous file with comments | « ui/gfx/geometry/axis_transform2d_unittest.cc ('k') | ui/gfx/test/gfx_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698