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/layer_quad.h" | 5 #include "cc/resources/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/quad_f.h" | 8 #include "ui/gfx/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 { | 14 { |
15 gfx::PointF p1(-0.5, -0.5); | 15 gfx::PointF p1(-0.5, -0.5); |
(...skipping 19 matching lines...) Expand all Loading... |
35 | 35 |
36 gfx::QuadF quad(p1, p2, p3, p4); | 36 gfx::QuadF quad(p1, p2, p3, p4); |
37 LayerQuad layerQuad(quad); | 37 LayerQuad layerQuad(quad); |
38 quad.Scale(2, 2); | 38 quad.Scale(2, 2); |
39 layerQuad.Inflate(0.5); | 39 layerQuad.Inflate(0.5); |
40 EXPECT_TRUE(layerQuad.ToQuadF() == quad); | 40 EXPECT_TRUE(layerQuad.ToQuadF() == quad); |
41 } | 41 } |
42 | 42 |
43 } // namespace | 43 } // namespace |
44 } // namespace cc | 44 } // namespace cc |
OLD | NEW |