OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/picture_layer.h" | 5 #include "cc/layers/picture_layer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 layer->SetBounds(gfx::Size(11, 11)); | 226 layer->SetBounds(gfx::Size(11, 11)); |
227 layer->SavePaintProperties(); | 227 layer->SavePaintProperties(); |
228 | 228 |
229 host_impl.CreatePendingTree(); | 229 host_impl.CreatePendingTree(); |
230 layer_impl = static_cast<FakePictureLayerImpl*>( | 230 layer_impl = static_cast<FakePictureLayerImpl*>( |
231 host_impl.pending_tree()->root_layer_for_testing()); | 231 host_impl.pending_tree()->root_layer_for_testing()); |
232 | 232 |
233 // We should now have invalid contents and should therefore clear the | 233 // We should now have invalid contents and should therefore clear the |
234 // recording source. | 234 // recording source. |
235 layer->PushPropertiesTo(layer_impl); | 235 layer->PushPropertiesTo(layer_impl); |
| 236 host_impl.pending_tree()->BuildPropertyTreesForTesting(); |
236 | 237 |
237 host_impl.ActivateSyncTree(); | 238 host_impl.ActivateSyncTree(); |
238 | 239 |
239 std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); | 240 std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); |
240 AppendQuadsData data; | 241 AppendQuadsData data; |
241 host_impl.active_tree()->root_layer_for_testing()->WillDraw( | 242 host_impl.active_tree()->root_layer_for_testing()->WillDraw( |
242 DRAW_MODE_SOFTWARE, nullptr); | 243 DRAW_MODE_SOFTWARE, nullptr); |
243 host_impl.active_tree()->root_layer_for_testing()->AppendQuads( | 244 host_impl.active_tree()->root_layer_for_testing()->AppendQuads( |
244 render_pass.get(), &data); | 245 render_pass.get(), &data); |
245 host_impl.active_tree()->root_layer_for_testing()->DidDraw(nullptr); | 246 host_impl.active_tree()->root_layer_for_testing()->DidDraw(nullptr); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 host2->Composite(base::TimeTicks::Now()); | 359 host2->Composite(base::TimeTicks::Now()); |
359 EXPECT_EQ(3, layer->update_count()); | 360 EXPECT_EQ(3, layer->update_count()); |
360 EXPECT_EQ(1, host2->SourceFrameNumber()); | 361 EXPECT_EQ(1, host2->SourceFrameNumber()); |
361 | 362 |
362 animation_host->SetMutatorHostClient(nullptr); | 363 animation_host->SetMutatorHostClient(nullptr); |
363 animation_host2->SetMutatorHostClient(nullptr); | 364 animation_host2->SetMutatorHostClient(nullptr); |
364 } | 365 } |
365 | 366 |
366 } // namespace | 367 } // namespace |
367 } // namespace cc | 368 } // namespace cc |
OLD | NEW |