| 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/base/scoped_ptr_vector.h" | |
| 6 #include "cc/layers/append_quads_data.h" | 5 #include "cc/layers/append_quads_data.h" |
| 7 #include "cc/layers/layer_impl.h" | 6 #include "cc/layers/layer_impl.h" |
| 8 #include "cc/layers/render_pass_sink.h" | 7 #include "cc/layers/render_pass_sink.h" |
| 9 #include "cc/layers/render_surface_impl.h" | 8 #include "cc/layers/render_surface_impl.h" |
| 10 #include "cc/quads/shared_quad_state.h" | 9 #include "cc/quads/shared_quad_state.h" |
| 11 #include "cc/test/fake_impl_task_runner_provider.h" | 10 #include "cc/test/fake_impl_task_runner_provider.h" |
| 12 #include "cc/test/fake_layer_tree_host_impl.h" | 11 #include "cc/test/fake_layer_tree_host_impl.h" |
| 13 #include "cc/test/geometry_test_utils.h" | 12 #include "cc/test/geometry_test_utils.h" |
| 14 #include "cc/test/mock_occlusion_tracker.h" | 13 #include "cc/test/mock_occlusion_tracker.h" |
| 15 #include "cc/test/test_shared_bitmap_manager.h" | 14 #include "cc/test/test_shared_bitmap_manager.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 origin.Translate(30.0, 40.0); | 172 origin.Translate(30.0, 40.0); |
| 174 | 173 |
| 175 render_surface->SetScreenSpaceTransform(origin); | 174 render_surface->SetScreenSpaceTransform(origin); |
| 176 render_surface->SetContentRect(content_rect); | 175 render_surface->SetContentRect(content_rect); |
| 177 | 176 |
| 178 TestRenderPassSink pass_sink; | 177 TestRenderPassSink pass_sink; |
| 179 | 178 |
| 180 render_surface->AppendRenderPasses(&pass_sink); | 179 render_surface->AppendRenderPasses(&pass_sink); |
| 181 | 180 |
| 182 ASSERT_EQ(1u, pass_sink.RenderPasses().size()); | 181 ASSERT_EQ(1u, pass_sink.RenderPasses().size()); |
| 183 RenderPass* pass = pass_sink.RenderPasses()[0]; | 182 RenderPass* pass = pass_sink.RenderPasses()[0].get(); |
| 184 | 183 |
| 185 EXPECT_EQ(RenderPassId(2, 0), pass->id); | 184 EXPECT_EQ(RenderPassId(2, 0), pass->id); |
| 186 EXPECT_EQ(content_rect, pass->output_rect); | 185 EXPECT_EQ(content_rect, pass->output_rect); |
| 187 EXPECT_EQ(origin, pass->transform_to_root_target); | 186 EXPECT_EQ(origin, pass->transform_to_root_target); |
| 188 } | 187 } |
| 189 | 188 |
| 190 } // namespace | 189 } // namespace |
| 191 } // namespace cc | 190 } // namespace cc |
| OLD | NEW |