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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "cc/test/fake_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
10 #include "cc/test/layer_tree_test.h" | 10 #include "cc/test/layer_tree_test.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 | 110 |
111 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { | 111 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { |
112 EXPECT_TRUE(result); | 112 EXPECT_TRUE(result); |
113 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 113 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
114 | 114 |
115 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); | 115 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); |
116 ASSERT_TRUE(last_frame.delegated_frame_data); | 116 ASSERT_TRUE(last_frame.delegated_frame_data); |
117 | 117 |
118 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); | 118 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); |
119 // Each render pass has 11 resources in it. And the root render pass has a | 119 // Each render pass has 10 resources in it. And the root render pass has a |
120 // mask resource used when drawing the child render pass, as well as its | 120 // mask resource used when drawing the child render pass, as well as its |
121 // replica (it's added twice). The number 11 may change if | 121 // replica (it's added twice). The number 10 may change if |
122 // AppendOneOfEveryQuadType() is updated, and the value here should be | 122 // AppendOneOfEveryQuadType() is updated, and the value here should be |
123 // updated accordingly. | 123 // updated accordingly. |
124 EXPECT_EQ(24u, last_frame.delegated_frame_data->resource_list.size()); | 124 EXPECT_EQ(22u, last_frame.delegated_frame_data->resource_list.size()); |
125 | 125 |
126 EndTest(); | 126 EndTest(); |
127 } | 127 } |
128 }; | 128 }; |
129 | 129 |
130 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( | 130 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( |
131 DelegatingRendererTestResources); | 131 DelegatingRendererTestResources); |
132 | 132 |
133 } // namespace cc | 133 } // namespace cc |
OLD | NEW |