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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, | 122 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, |
123 bool result) OVERRIDE { | 123 bool result) OVERRIDE { |
124 EXPECT_TRUE(result); | 124 EXPECT_TRUE(result); |
125 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 125 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
126 | 126 |
127 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); | 127 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); |
128 ASSERT_TRUE(last_frame.delegated_frame_data); | 128 ASSERT_TRUE(last_frame.delegated_frame_data); |
129 | 129 |
130 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); | 130 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); |
131 // Each render pass has 10 resources in it. And the root render pass has a | 131 // Each render pass has 10 resources in it. And the root render pass has a |
132 // mask resource used when drawing the child render pass. The number 10 may | 132 // mask resource used when drawing the child render pass, as well as its |
133 // change if AppendOneOfEveryQuadType() is updated, and the value here | 133 // replica (it's added twice). The number 10 may change if |
134 // should be updated accordingly. | 134 // AppendOneOfEveryQuadType() is updated, and the value here should be |
| 135 // updated accordingly. |
135 EXPECT_EQ( | 136 EXPECT_EQ( |
136 21u, last_frame.delegated_frame_data->resource_list.size()); | 137 22u, last_frame.delegated_frame_data->resource_list.size()); |
137 | 138 |
138 EndTest(); | 139 EndTest(); |
139 } | 140 } |
140 }; | 141 }; |
141 | 142 |
142 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( | 143 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( |
143 DelegatingRendererTestResources); | 144 DelegatingRendererTestResources); |
144 | 145 |
145 } // namespace cc | 146 } // namespace cc |
OLD | NEW |