OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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" | 5 #include "cc/base/scoped_ptr_vector.h" |
6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
7 #include "cc/output/output_surface.h" | 7 #include "cc/output/output_surface.h" |
8 #include "cc/output/output_surface_client.h" | 8 #include "cc/output/output_surface_client.h" |
9 #include "cc/output/overlay_candidate_validator.h" | 9 #include "cc/output/overlay_candidate_validator.h" |
10 #include "cc/output/overlay_processor.h" | 10 #include "cc/output/overlay_processor.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 | 197 |
198 static void CompareRenderPassLists(const RenderPassList& expected_list, | 198 static void CompareRenderPassLists(const RenderPassList& expected_list, |
199 const RenderPassList& actual_list) { | 199 const RenderPassList& actual_list) { |
200 EXPECT_EQ(expected_list.size(), actual_list.size()); | 200 EXPECT_EQ(expected_list.size(), actual_list.size()); |
201 for (size_t i = 0; i < actual_list.size(); ++i) { | 201 for (size_t i = 0; i < actual_list.size(); ++i) { |
202 RenderPass* expected = expected_list[i]; | 202 RenderPass* expected = expected_list[i]; |
203 RenderPass* actual = actual_list[i]; | 203 RenderPass* actual = actual_list[i]; |
204 | 204 |
205 EXPECT_EQ(expected->id, actual->id); | 205 EXPECT_EQ(expected->id, actual->id); |
206 EXPECT_RECT_EQ(expected->output_rect, actual->output_rect); | 206 EXPECT_EQ(expected->output_rect, actual->output_rect); |
207 EXPECT_EQ(expected->transform_to_root_target, | 207 EXPECT_EQ(expected->transform_to_root_target, |
208 actual->transform_to_root_target); | 208 actual->transform_to_root_target); |
209 EXPECT_RECT_EQ(expected->damage_rect, actual->damage_rect); | 209 EXPECT_EQ(expected->damage_rect, actual->damage_rect); |
210 EXPECT_EQ(expected->has_transparent_background, | 210 EXPECT_EQ(expected->has_transparent_background, |
211 actual->has_transparent_background); | 211 actual->has_transparent_background); |
212 | 212 |
213 EXPECT_EQ(expected->shared_quad_state_list.size(), | 213 EXPECT_EQ(expected->shared_quad_state_list.size(), |
214 actual->shared_quad_state_list.size()); | 214 actual->shared_quad_state_list.size()); |
215 EXPECT_EQ(expected->quad_list.size(), actual->quad_list.size()); | 215 EXPECT_EQ(expected->quad_list.size(), actual->quad_list.size()); |
216 | 216 |
217 for (auto exp_iter = expected->quad_list.cbegin(), | 217 for (auto exp_iter = expected->quad_list.cbegin(), |
218 act_iter = actual->quad_list.cbegin(); | 218 act_iter = actual->quad_list.cbegin(); |
219 exp_iter != expected->quad_list.cend(); | 219 exp_iter != expected->quad_list.cend(); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 renderer_->BeginDrawingFrame(&frame3); | 805 renderer_->BeginDrawingFrame(&frame3); |
806 renderer_->FinishDrawingFrame(&frame3); | 806 renderer_->FinishDrawingFrame(&frame3); |
807 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); | 807 EXPECT_TRUE(resource_provider_->InUseByConsumer(resource1)); |
808 SwapBuffers(); | 808 SwapBuffers(); |
809 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 809 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
810 Mock::VerifyAndClearExpectations(&scheduler_); | 810 Mock::VerifyAndClearExpectations(&scheduler_); |
811 } | 811 } |
812 | 812 |
813 } // namespace | 813 } // namespace |
814 } // namespace cc | 814 } // namespace cc |
OLD | NEW |