| 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/surfaces/surface_aggregator.h" | 5 #include "cc/surfaces/surface_aggregator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 EXPECT_EQ(arraysize(surface_ids), | 467 EXPECT_EQ(arraysize(surface_ids), |
| 468 aggregator_.previous_contained_surfaces().size()); | 468 aggregator_.previous_contained_surfaces().size()); |
| 469 for (size_t i = 0; i < arraysize(surface_ids); i++) { | 469 for (size_t i = 0; i < arraysize(surface_ids); i++) { |
| 470 EXPECT_TRUE( | 470 EXPECT_TRUE( |
| 471 aggregator_.previous_contained_surfaces().find(surface_ids[i]) != | 471 aggregator_.previous_contained_surfaces().find(surface_ids[i]) != |
| 472 aggregator_.previous_contained_surfaces().end()); | 472 aggregator_.previous_contained_surfaces().end()); |
| 473 } | 473 } |
| 474 | 474 |
| 475 // Ensure copy requests have been removed from root surface. | 475 // Ensure copy requests have been removed from root surface. |
| 476 const CompositorFrame& original_frame = | 476 const CompositorFrame& original_frame = |
| 477 manager_.GetSurfaceForId(root_surface_id)->GetEligibleFrame(); | 477 manager_.GetSurfaceForId(root_surface_id)->GetActiveFrame(); |
| 478 const RenderPassList& original_pass_list = original_frame.render_pass_list; | 478 const RenderPassList& original_pass_list = original_frame.render_pass_list; |
| 479 ASSERT_EQ(2u, original_pass_list.size()); | 479 ASSERT_EQ(2u, original_pass_list.size()); |
| 480 DCHECK(original_pass_list[0]->copy_requests.empty()); | 480 DCHECK(original_pass_list[0]->copy_requests.empty()); |
| 481 DCHECK(original_pass_list[1]->copy_requests.empty()); | 481 DCHECK(original_pass_list[1]->copy_requests.empty()); |
| 482 | 482 |
| 483 embedded_factory.EvictSurface(); | 483 embedded_factory.EvictSurface(); |
| 484 } | 484 } |
| 485 | 485 |
| 486 TEST_F(SurfaceAggregatorValidSurfaceTest, UnreferencedSurface) { | 486 TEST_F(SurfaceAggregatorValidSurfaceTest, UnreferencedSurface) { |
| 487 SurfaceFactory embedded_factory(kArbitraryChildFrameSinkId, &manager_, | 487 SurfaceFactory embedded_factory(kArbitraryChildFrameSinkId, &manager_, |
| (...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2082 // Output is insecure, so texture should be drawn. | 2082 // Output is insecure, so texture should be drawn. |
| 2083 EXPECT_EQ(DrawQuad::SOLID_COLOR, render_pass->quad_list.back()->material); | 2083 EXPECT_EQ(DrawQuad::SOLID_COLOR, render_pass->quad_list.back()->material); |
| 2084 | 2084 |
| 2085 factory1.EvictSurface(); | 2085 factory1.EvictSurface(); |
| 2086 factory2.EvictSurface(); | 2086 factory2.EvictSurface(); |
| 2087 } | 2087 } |
| 2088 | 2088 |
| 2089 } // namespace | 2089 } // namespace |
| 2090 } // namespace cc | 2090 } // namespace cc |
| 2091 | 2091 |
| OLD | NEW |