OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3554 child->SetPosition(gfx::PointF(25.f * i, 0.f)); | 3554 child->SetPosition(gfx::PointF(25.f * i, 0.f)); |
3555 child->SetBounds(gfx::Size(1, 1)); | 3555 child->SetBounds(gfx::Size(1, 1)); |
3556 child->SetDrawsContent(true); | 3556 child->SetDrawsContent(true); |
3557 child->SetPrimarySurfaceInfo( | 3557 child->SetPrimarySurfaceInfo( |
3558 SurfaceInfo(children[i], 1.f /* device_scale_factor */, | 3558 SurfaceInfo(children[i], 1.f /* device_scale_factor */, |
3559 gfx::Size(10, 10) /* size_in_pixels */)); | 3559 gfx::Size(10, 10) /* size_in_pixels */)); |
3560 root->test_properties()->AddChild(std::move(child)); | 3560 root->test_properties()->AddChild(std::move(child)); |
3561 } | 3561 } |
3562 | 3562 |
3563 host_impl_->active_tree()->BuildPropertyTreesForTesting(); | 3563 host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
| 3564 host_impl_->active_tree()->SetSurfaceLayerIds(children); |
3564 DrawFrame(); | 3565 DrawFrame(); |
3565 | 3566 |
3566 FakeCompositorFrameSink* fake_compositor_frame_sink = | 3567 FakeCompositorFrameSink* fake_compositor_frame_sink = |
3567 static_cast<FakeCompositorFrameSink*>( | 3568 static_cast<FakeCompositorFrameSink*>( |
3568 host_impl_->compositor_frame_sink()); | 3569 host_impl_->compositor_frame_sink()); |
3569 const CompositorFrameMetadata& metadata = | 3570 const CompositorFrameMetadata& metadata = |
3570 fake_compositor_frame_sink->last_sent_frame()->metadata; | 3571 fake_compositor_frame_sink->last_sent_frame()->metadata; |
3571 EXPECT_THAT(metadata.activation_dependencies, | 3572 EXPECT_THAT(metadata.activation_dependencies, |
3572 testing::UnorderedElementsAre(children[0], children[1])); | 3573 testing::UnorderedElementsAre(children[0], children[1])); |
3573 EXPECT_THAT( | 3574 EXPECT_THAT( |
(...skipping 8889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12463 else | 12464 else |
12464 EXPECT_FALSE(tile->HasRasterTask()); | 12465 EXPECT_FALSE(tile->HasRasterTask()); |
12465 } | 12466 } |
12466 Region expected_invalidation( | 12467 Region expected_invalidation( |
12467 raster_source->GetRectForImage(checkerable_image.stable_id())); | 12468 raster_source->GetRectForImage(checkerable_image.stable_id())); |
12468 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 12469 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); |
12469 } | 12470 } |
12470 | 12471 |
12471 } // namespace | 12472 } // namespace |
12472 } // namespace cc | 12473 } // namespace cc |
OLD | NEW |