OLD | NEW |
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 #include "cc/resources/layer_quad.h" | 5 #include "cc/output/layer_quad.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "ui/gfx/geometry/quad_f.h" | 8 #include "ui/gfx/geometry/quad_f.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 namespace { | 11 namespace { |
12 | 12 |
13 TEST(LayerQuadTest, QuadFConversion) { | 13 TEST(LayerQuadTest, QuadFConversion) { |
14 gfx::PointF p1(-0.5f, -0.5f); | 14 gfx::PointF p1(-0.5f, -0.5f); |
15 gfx::PointF p2(0.5f, -0.5f); | 15 gfx::PointF p2(0.5f, -0.5f); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // With more than one degenerate edge, we expect the quad to be zero. | 60 // With more than one degenerate edge, we expect the quad to be zero. |
61 EXPECT_EQ(quad, degenerate_quad.ToQuadF()); | 61 EXPECT_EQ(quad, degenerate_quad.ToQuadF()); |
62 | 62 |
63 LayerQuad triangle_quad(e1d, e2, e3, e4); | 63 LayerQuad triangle_quad(e1d, e2, e3, e4); |
64 // With only one degenerate edge, we expect the quad to be a triangle. | 64 // With only one degenerate edge, we expect the quad to be a triangle. |
65 EXPECT_EQ(triangle, triangle_quad.ToQuadF()); | 65 EXPECT_EQ(triangle, triangle_quad.ToQuadF()); |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 } // namespace cc | 69 } // namespace cc |
OLD | NEW |