| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 233 layer->SetBounds(gfx::Size(0, 0)); | 233 layer->SetBounds(gfx::Size(0, 0)); |
| 234 layer->SavePaintProperties(); | 234 layer->SavePaintProperties(); |
| 235 // Intentionally skipping Update since it would normally be skipped on | 235 // Intentionally skipping Update since it would normally be skipped on |
| 236 // a layer with empty bounds. | 236 // a layer with empty bounds. |
| 237 | 237 |
| 238 FakeImplTaskRunnerProvider impl_task_runner_provider; | 238 FakeImplTaskRunnerProvider impl_task_runner_provider; |
| 239 | 239 |
| 240 TestSharedBitmapManager shared_bitmap_manager; | 240 TestSharedBitmapManager shared_bitmap_manager; |
| 241 std::unique_ptr<FakeOutputSurface> output_surface = | 241 std::unique_ptr<FakeOutputSurface> output_surface = |
| 242 FakeOutputSurface::CreateSoftware( | 242 FakeOutputSurface::CreateDelegatingSoftware(); |
| 243 base::WrapUnique(new SoftwareOutputDevice)); | |
| 244 FakeLayerTreeHostImpl host_impl(LayerTreeSettings(), | 243 FakeLayerTreeHostImpl host_impl(LayerTreeSettings(), |
| 245 &impl_task_runner_provider, | 244 &impl_task_runner_provider, |
| 246 &shared_bitmap_manager, &task_graph_runner); | 245 &shared_bitmap_manager, &task_graph_runner); |
| 247 host_impl.InitializeRenderer(output_surface.get()); | 246 host_impl.InitializeRenderer(output_surface.get()); |
| 248 host_impl.CreatePendingTree(); | 247 host_impl.CreatePendingTree(); |
| 249 std::unique_ptr<FakePictureLayerImpl> layer_impl = | 248 std::unique_ptr<FakePictureLayerImpl> layer_impl = |
| 250 FakePictureLayerImpl::Create(host_impl.pending_tree(), 1); | 249 FakePictureLayerImpl::Create(host_impl.pending_tree(), 1); |
| 251 | 250 |
| 252 layer->PushPropertiesTo(layer_impl.get()); | 251 layer->PushPropertiesTo(layer_impl.get()); |
| 253 EXPECT_FALSE(layer_impl->CanHaveTilings()); | 252 EXPECT_FALSE(layer_impl->CanHaveTilings()); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 // Do a main frame, record the picture layers. The frame number has changed | 524 // Do a main frame, record the picture layers. The frame number has changed |
| 526 // non-monotonically. | 525 // non-monotonically. |
| 527 layer->SetNeedsDisplay(); | 526 layer->SetNeedsDisplay(); |
| 528 host2->Composite(base::TimeTicks::Now()); | 527 host2->Composite(base::TimeTicks::Now()); |
| 529 EXPECT_EQ(3, layer->update_count()); | 528 EXPECT_EQ(3, layer->update_count()); |
| 530 EXPECT_EQ(1, host2->source_frame_number()); | 529 EXPECT_EQ(1, host2->source_frame_number()); |
| 531 } | 530 } |
| 532 | 531 |
| 533 } // namespace | 532 } // namespace |
| 534 } // namespace cc | 533 } // namespace cc |
| OLD | NEW |