| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/output/delegating_renderer.h" | 5 #include "cc/output/delegating_renderer.h" |
| 6 | 6 |
| 7 #include "cc/test/fake_output_surface.h" | 7 #include "cc/test/fake_output_surface.h" |
| 8 #include "cc/test/layer_tree_test.h" | 8 #include "cc/test/layer_tree_test.h" |
| 9 #include "cc/test/render_pass_test_common.h" | 9 #include "cc/test/render_pass_test_common.h" |
| 10 #include "cc/test/render_pass_test_utils.h" | 10 #include "cc/test/render_pass_test_utils.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, | 121 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, |
| 122 bool result) OVERRIDE { | 122 bool result) OVERRIDE { |
| 123 EXPECT_TRUE(result); | 123 EXPECT_TRUE(result); |
| 124 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 124 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
| 125 | 125 |
| 126 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); | 126 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); |
| 127 ASSERT_TRUE(last_frame.delegated_frame_data); | 127 ASSERT_TRUE(last_frame.delegated_frame_data); |
| 128 | 128 |
| 129 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); | 129 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); |
| 130 // Each render pass has 9 resources in it. And the root render pass has a | 130 // Each render pass has 10 resources in it. And the root render pass has a |
| 131 // mask resource used when drawing the child render pass. The number 9 may | 131 // mask resource used when drawing the child render pass. The number 10 may |
| 132 // change if AppendOneOfEveryQuadType() is updated, and the value here | 132 // change if AppendOneOfEveryQuadType() is updated, and the value here |
| 133 // should be updated accordingly. | 133 // should be updated accordingly. |
| 134 EXPECT_EQ( | 134 EXPECT_EQ( |
| 135 19u, last_frame.delegated_frame_data->resource_list.size()); | 135 21u, last_frame.delegated_frame_data->resource_list.size()); |
| 136 | 136 |
| 137 EndTest(); | 137 EndTest(); |
| 138 } | 138 } |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( | 141 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( |
| 142 DelegatingRendererTestResources); | 142 DelegatingRendererTestResources); |
| 143 | 143 |
| 144 } // namespace cc | 144 } // namespace cc |
| OLD | NEW |