| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/test/layer_test_common.h" | 5 #include "cc/test/layer_test_common.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
| 10 #include "cc/animation/animation_id_provider.h" | 10 #include "cc/animation/animation_id_provider.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 animation_host_(AnimationHost::CreateForTesting(ThreadInstance::MAIN)), | 123 animation_host_(AnimationHost::CreateForTesting(ThreadInstance::MAIN)), |
| 124 host_(FakeLayerTreeHost::Create(&client_, | 124 host_(FakeLayerTreeHost::Create(&client_, |
| 125 &task_graph_runner_, | 125 &task_graph_runner_, |
| 126 animation_host_.get(), | 126 animation_host_.get(), |
| 127 settings)), | 127 settings)), |
| 128 render_pass_(RenderPass::Create()), | 128 render_pass_(RenderPass::Create()), |
| 129 layer_impl_id_(2) { | 129 layer_impl_id_(2) { |
| 130 std::unique_ptr<LayerImpl> root = | 130 std::unique_ptr<LayerImpl> root = |
| 131 LayerImpl::Create(host_->host_impl()->active_tree(), 1); | 131 LayerImpl::Create(host_->host_impl()->active_tree(), 1); |
| 132 host_->host_impl()->active_tree()->SetRootLayerForTesting(std::move(root)); | 132 host_->host_impl()->active_tree()->SetRootLayerForTesting(std::move(root)); |
| 133 root_layer_for_testing()->SetHasRenderSurface(true); | |
| 134 host_->host_impl()->SetVisible(true); | 133 host_->host_impl()->SetVisible(true); |
| 135 EXPECT_TRUE( | 134 EXPECT_TRUE( |
| 136 host_->host_impl()->InitializeRenderer(compositor_frame_sink_.get())); | 135 host_->host_impl()->InitializeRenderer(compositor_frame_sink_.get())); |
| 137 | 136 |
| 138 const int timeline_id = AnimationIdProvider::NextTimelineId(); | 137 const int timeline_id = AnimationIdProvider::NextTimelineId(); |
| 139 timeline_ = AnimationTimeline::Create(timeline_id); | 138 timeline_ = AnimationTimeline::Create(timeline_id); |
| 140 animation_host_->AddAnimationTimeline(timeline_); | 139 animation_host_->AddAnimationTimeline(timeline_); |
| 141 // Create impl-side instance. | 140 // Create impl-side instance. |
| 142 animation_host_->PushPropertiesTo(host_->host_impl()->animation_host()); | 141 animation_host_->PushPropertiesTo(host_->host_impl()->animation_host()); |
| 143 timeline_impl_ = | 142 timeline_impl_ = |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 207 } |
| 209 | 208 |
| 210 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} | 209 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} |
| 211 | 210 |
| 212 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { | 211 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { |
| 213 root_layer_for_testing()->test_properties()->copy_requests.push_back( | 212 root_layer_for_testing()->test_properties()->copy_requests.push_back( |
| 214 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); | 213 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); |
| 215 } | 214 } |
| 216 | 215 |
| 217 } // namespace cc | 216 } // namespace cc |
| OLD | NEW |