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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); | 112 EXPECT_TRUE(quad->rect.Contains(quad->visible_rect)); |
113 ++(*partially_occluded_count); | 113 ++(*partially_occluded_count); |
114 } | 114 } |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 LayerTestCommon::LayerImplTest::LayerImplTest() | 118 LayerTestCommon::LayerImplTest::LayerImplTest() |
119 : LayerImplTest(LayerTreeSettingsForTesting()) {} | 119 : LayerImplTest(LayerTreeSettingsForTesting()) {} |
120 | 120 |
121 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings) | 121 LayerTestCommon::LayerImplTest::LayerImplTest(const LayerTreeSettings& settings) |
122 : client_(FakeLayerTreeHostClient::DIRECT_3D), | 122 : output_surface_(FakeOutputSurface::CreateDelegating3d()), |
123 output_surface_(FakeOutputSurface::Create3d()), | |
124 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)), | 123 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_, settings)), |
125 render_pass_(RenderPass::Create()), | 124 render_pass_(RenderPass::Create()), |
126 layer_impl_id_(2) { | 125 layer_impl_id_(2) { |
127 std::unique_ptr<LayerImpl> root = | 126 std::unique_ptr<LayerImpl> root = |
128 LayerImpl::Create(host_->host_impl()->active_tree(), 1); | 127 LayerImpl::Create(host_->host_impl()->active_tree(), 1); |
129 host_->host_impl()->active_tree()->SetRootLayerForTesting(std::move(root)); | 128 host_->host_impl()->active_tree()->SetRootLayerForTesting(std::move(root)); |
130 root_layer_for_testing()->SetHasRenderSurface(true); | 129 root_layer_for_testing()->SetHasRenderSurface(true); |
131 host_->host_impl()->SetVisible(true); | 130 host_->host_impl()->SetVisible(true); |
132 host_->host_impl()->InitializeRenderer(output_surface_.get()); | 131 host_->host_impl()->InitializeRenderer(output_surface_.get()); |
133 | 132 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 205 } |
207 | 206 |
208 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} | 207 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} |
209 | 208 |
210 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { | 209 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { |
211 root_layer_for_testing()->test_properties()->copy_requests.push_back( | 210 root_layer_for_testing()->test_properties()->copy_requests.push_back( |
212 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); | 211 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); |
213 } | 212 } |
214 | 213 |
215 } // namespace cc | 214 } // namespace cc |
OLD | NEW |