OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/render_pass.h" | 5 #include "cc/render_pass.h" |
6 | 6 |
7 #include "cc/checkerboard_draw_quad.h" | 7 #include "cc/checkerboard_draw_quad.h" |
8 #include "cc/math_util.h" | 8 #include "cc/math_util.h" |
9 #include "cc/test/geometry_test_utils.h" | 9 #include "cc/test/geometry_test_utils.h" |
10 #include "cc/test/render_pass_test_common.h" | 10 #include "cc/test/render_pass_test_common.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 gfx::Rect m_outputRect; | 27 gfx::Rect m_outputRect; |
28 gfx::RectF m_damageRect; | 28 gfx::RectF m_damageRect; |
29 bool m_hasTransparentBackground; | 29 bool m_hasTransparentBackground; |
30 bool m_hasOcclusionFromOutsideTargetSurface; | 30 bool m_hasOcclusionFromOutsideTargetSurface; |
31 }; | 31 }; |
32 | 32 |
33 TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads) | 33 TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads) |
34 { | 34 { |
35 RenderPass::Id id(3, 2); | 35 RenderPass::Id id(3, 2); |
36 gfx::Rect outputRect(45, 22, 120, 13); | 36 gfx::Rect outputRect(45, 22, 120, 13); |
37 gfx::Transform transformToRoot = MathUtil::createGfxTransform(1, 0.5, 0.5, - 0.5, -1, 0); | 37 gfx::Transform transformToRoot = gfx::Transform(1, 0.5, 0.5, -0.5, -1, 0); |
danakj
2013/01/11 04:14:12
nit: 1.0, 0.5...
| |
38 gfx::Rect damageRect(56, 123, 19, 43); | 38 gfx::Rect damageRect(56, 123, 19, 43); |
39 bool hasTransparentBackground = true; | 39 bool hasTransparentBackground = true; |
40 bool hasOcclusionFromOutsideTargetSurface = true; | 40 bool hasOcclusionFromOutsideTargetSurface = true; |
41 | 41 |
42 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); | 42 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); |
43 pass->SetAll(id, | 43 pass->SetAll(id, |
44 outputRect, | 44 outputRect, |
45 damageRect, | 45 damageRect, |
46 transformToRoot, | 46 transformToRoot, |
47 hasTransparentBackground, | 47 hasTransparentBackground, |
(...skipping 17 matching lines...) Expand all Loading... | |
65 EXPECT_RECT_EQ(pass->damage_rect, copy->damage_rect); | 65 EXPECT_RECT_EQ(pass->damage_rect, copy->damage_rect); |
66 EXPECT_EQ(pass->has_transparent_background, copy->has_transparent_background ); | 66 EXPECT_EQ(pass->has_transparent_background, copy->has_transparent_background ); |
67 EXPECT_EQ(pass->has_occlusion_from_outside_target_surface, copy->has_occlusi on_from_outside_target_surface); | 67 EXPECT_EQ(pass->has_occlusion_from_outside_target_surface, copy->has_occlusi on_from_outside_target_surface); |
68 EXPECT_EQ(0u, copy->quad_list.size()); | 68 EXPECT_EQ(0u, copy->quad_list.size()); |
69 | 69 |
70 EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass)); | 70 EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass)); |
71 } | 71 } |
72 | 72 |
73 } // namespace | 73 } // namespace |
74 } // namespace cc | 74 } // namespace cc |
OLD | NEW |