| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // Create impl-side instance. | 137 // Create impl-side instance. |
| 138 host_->animation_host()->PushPropertiesTo( | 138 host_->animation_host()->PushPropertiesTo( |
| 139 host_->host_impl()->animation_host()); | 139 host_->host_impl()->animation_host()); |
| 140 timeline_impl_ = | 140 timeline_impl_ = |
| 141 host_->host_impl()->animation_host()->GetTimelineById(timeline_id); | 141 host_->host_impl()->animation_host()->GetTimelineById(timeline_id); |
| 142 } | 142 } |
| 143 | 143 |
| 144 LayerTestCommon::LayerImplTest::~LayerImplTest() { | 144 LayerTestCommon::LayerImplTest::~LayerImplTest() { |
| 145 host_->animation_host()->RemoveAnimationTimeline(timeline_); | 145 host_->animation_host()->RemoveAnimationTimeline(timeline_); |
| 146 timeline_ = nullptr; | 146 timeline_ = nullptr; |
| 147 host_->host_impl()->ReleaseOutputSurface(); |
| 147 } | 148 } |
| 148 | 149 |
| 149 void LayerTestCommon::LayerImplTest::CalcDrawProps( | 150 void LayerTestCommon::LayerImplTest::CalcDrawProps( |
| 150 const gfx::Size& viewport_size) { | 151 const gfx::Size& viewport_size) { |
| 151 LayerImplList layer_list; | 152 LayerImplList layer_list; |
| 152 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 153 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
| 153 root_layer_for_testing(), viewport_size, &layer_list); | 154 root_layer_for_testing(), viewport_size, &layer_list); |
| 154 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs); | 155 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs); |
| 155 } | 156 } |
| 156 | 157 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 206 } |
| 206 | 207 |
| 207 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} | 208 void EmptyCopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {} |
| 208 | 209 |
| 209 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { | 210 void LayerTestCommon::LayerImplTest::RequestCopyOfOutput() { |
| 210 root_layer_for_testing()->test_properties()->copy_requests.push_back( | 211 root_layer_for_testing()->test_properties()->copy_requests.push_back( |
| 211 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); | 212 CopyOutputRequest::CreateRequest(base::Bind(&EmptyCopyOutputCallback))); |
| 212 } | 213 } |
| 213 | 214 |
| 214 } // namespace cc | 215 } // namespace cc |
| OLD | NEW |