| 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_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 4215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4226 time_ticks += base::TimeDelta::FromMilliseconds(1); | 4226 time_ticks += base::TimeDelta::FromMilliseconds(1); |
| 4227 host_impl_.SetCurrentBeginFrameArgs( | 4227 host_impl_.SetCurrentBeginFrameArgs( |
| 4228 CreateBeginFrameArgsForTesting(time_ticks)); | 4228 CreateBeginFrameArgsForTesting(time_ticks)); |
| 4229 | 4229 |
| 4230 gfx::Size tile_size(100, 100); | 4230 gfx::Size tile_size(100, 100); |
| 4231 gfx::Size layer_bounds(200, 200); | 4231 gfx::Size layer_bounds(200, 200); |
| 4232 gfx::Rect layer_rect(layer_bounds); | 4232 gfx::Rect layer_rect(layer_bounds); |
| 4233 | 4233 |
| 4234 FakeContentLayerClient client; | 4234 FakeContentLayerClient client; |
| 4235 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); | 4235 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); |
| 4236 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); | 4236 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(); |
| 4237 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&host_client); | |
| 4238 host->SetRootLayer(layer); | 4237 host->SetRootLayer(layer); |
| 4239 PicturePile* pile = layer->GetPicturePileForTesting(); | 4238 PicturePile* pile = layer->GetPicturePileForTesting(); |
| 4240 | 4239 |
| 4241 host_impl_.SetViewportSize(layer_bounds); | 4240 host_impl_.SetViewportSize(layer_bounds); |
| 4242 | 4241 |
| 4243 int frame_number = 0; | 4242 int frame_number = 0; |
| 4244 FakeRenderingStatsInstrumentation stats_instrumentation; | 4243 FakeRenderingStatsInstrumentation stats_instrumentation; |
| 4245 | 4244 |
| 4246 client.set_fill_with_nonsolid_color(!test_for_solid); | 4245 client.set_fill_with_nonsolid_color(!test_for_solid); |
| 4247 | 4246 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4302 time_ticks += base::TimeDelta::FromMilliseconds(1); | 4301 time_ticks += base::TimeDelta::FromMilliseconds(1); |
| 4303 host_impl_.SetCurrentBeginFrameArgs( | 4302 host_impl_.SetCurrentBeginFrameArgs( |
| 4304 CreateBeginFrameArgsForTesting(time_ticks)); | 4303 CreateBeginFrameArgsForTesting(time_ticks)); |
| 4305 | 4304 |
| 4306 gfx::Size tile_size(100, 100); | 4305 gfx::Size tile_size(100, 100); |
| 4307 gfx::Size layer_bounds(200, 200); | 4306 gfx::Size layer_bounds(200, 200); |
| 4308 gfx::Rect layer_rect(layer_bounds); | 4307 gfx::Rect layer_rect(layer_bounds); |
| 4309 | 4308 |
| 4310 FakeContentLayerClient client; | 4309 FakeContentLayerClient client; |
| 4311 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); | 4310 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); |
| 4312 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); | 4311 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(); |
| 4313 scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&host_client); | |
| 4314 host->SetRootLayer(layer); | 4312 host->SetRootLayer(layer); |
| 4315 PicturePile* pile = layer->GetPicturePileForTesting(); | 4313 PicturePile* pile = layer->GetPicturePileForTesting(); |
| 4316 | 4314 |
| 4317 host_impl_.SetViewportSize(layer_bounds); | 4315 host_impl_.SetViewportSize(layer_bounds); |
| 4318 | 4316 |
| 4319 int frame_number = 0; | 4317 int frame_number = 0; |
| 4320 FakeRenderingStatsInstrumentation stats_instrumentation; | 4318 FakeRenderingStatsInstrumentation stats_instrumentation; |
| 4321 | 4319 |
| 4322 client.set_fill_with_nonsolid_color(true); | 4320 client.set_fill_with_nonsolid_color(true); |
| 4323 | 4321 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4364 SetupPendingTree(pending_pile2); | 4362 SetupPendingTree(pending_pile2); |
| 4365 ActivateTree(); | 4363 ActivateTree(); |
| 4366 | 4364 |
| 4367 // We've switched to a solid color, so we should end up with no tilings. | 4365 // We've switched to a solid color, so we should end up with no tilings. |
| 4368 ASSERT_TRUE(active_layer_->tilings()); | 4366 ASSERT_TRUE(active_layer_->tilings()); |
| 4369 EXPECT_EQ(0u, active_layer_->tilings()->num_tilings()); | 4367 EXPECT_EQ(0u, active_layer_->tilings()->num_tilings()); |
| 4370 } | 4368 } |
| 4371 | 4369 |
| 4372 } // namespace | 4370 } // namespace |
| 4373 } // namespace cc | 4371 } // namespace cc |
| OLD | NEW |