| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/layers/layer_iterator.h" | 8 #include "cc/layers/layer_iterator.h" |
| 9 #include "cc/output/copy_output_request.h" | 9 #include "cc/output/copy_output_request.h" |
| 10 #include "cc/output/copy_output_result.h" | 10 #include "cc/output/copy_output_result.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 root_ = FakePictureLayer::Create(&client_); | 338 root_ = FakePictureLayer::Create(&client_); |
| 339 root_->SetBounds(gfx::Size(20, 20)); | 339 root_->SetBounds(gfx::Size(20, 20)); |
| 340 | 340 |
| 341 grand_parent_layer_ = FakePictureLayer::Create(&client_); | 341 grand_parent_layer_ = FakePictureLayer::Create(&client_); |
| 342 grand_parent_layer_->SetBounds(gfx::Size(15, 15)); | 342 grand_parent_layer_->SetBounds(gfx::Size(15, 15)); |
| 343 root_->AddChild(grand_parent_layer_); | 343 root_->AddChild(grand_parent_layer_); |
| 344 | 344 |
| 345 // parent_layer_ owns a render surface. | 345 // parent_layer_ owns a render surface. |
| 346 parent_layer_ = FakePictureLayer::Create(&client_); | 346 parent_layer_ = FakePictureLayer::Create(&client_); |
| 347 parent_layer_->SetBounds(gfx::Size(15, 15)); | 347 parent_layer_->SetBounds(gfx::Size(15, 15)); |
| 348 parent_layer_->SetForceRenderSurface(true); | 348 parent_layer_->SetForceRenderSurfaceForTesting(true); |
| 349 grand_parent_layer_->AddChild(parent_layer_); | 349 grand_parent_layer_->AddChild(parent_layer_); |
| 350 | 350 |
| 351 copy_layer_ = FakePictureLayer::Create(&client_); | 351 copy_layer_ = FakePictureLayer::Create(&client_); |
| 352 copy_layer_->SetBounds(gfx::Size(10, 10)); | 352 copy_layer_->SetBounds(gfx::Size(10, 10)); |
| 353 parent_layer_->AddChild(copy_layer_); | 353 parent_layer_->AddChild(copy_layer_); |
| 354 | 354 |
| 355 layer_tree_host()->SetRootLayer(root_); | 355 layer_tree_host()->SetRootLayer(root_); |
| 356 LayerTreeHostCopyRequestTest::SetupTree(); | 356 LayerTreeHostCopyRequestTest::SetupTree(); |
| 357 client_.set_bounds(root_->bounds()); | 357 client_.set_bounds(root_->bounds()); |
| 358 } | 358 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 root_->SetBounds(gfx::Size(20, 20)); | 439 root_->SetBounds(gfx::Size(20, 20)); |
| 440 | 440 |
| 441 grand_parent_layer_ = FakePictureLayer::Create(&client_); | 441 grand_parent_layer_ = FakePictureLayer::Create(&client_); |
| 442 grand_parent_layer_->SetBounds(gfx::Size(15, 15)); | 442 grand_parent_layer_->SetBounds(gfx::Size(15, 15)); |
| 443 grand_parent_layer_->SetHideLayerAndSubtree(true); | 443 grand_parent_layer_->SetHideLayerAndSubtree(true); |
| 444 root_->AddChild(grand_parent_layer_); | 444 root_->AddChild(grand_parent_layer_); |
| 445 | 445 |
| 446 // parent_layer_ owns a render surface. | 446 // parent_layer_ owns a render surface. |
| 447 parent_layer_ = FakePictureLayer::Create(&client_); | 447 parent_layer_ = FakePictureLayer::Create(&client_); |
| 448 parent_layer_->SetBounds(gfx::Size(15, 15)); | 448 parent_layer_->SetBounds(gfx::Size(15, 15)); |
| 449 parent_layer_->SetForceRenderSurface(true); | 449 parent_layer_->SetForceRenderSurfaceForTesting(true); |
| 450 grand_parent_layer_->AddChild(parent_layer_); | 450 grand_parent_layer_->AddChild(parent_layer_); |
| 451 | 451 |
| 452 copy_layer_ = FakePictureLayer::Create(&client_); | 452 copy_layer_ = FakePictureLayer::Create(&client_); |
| 453 copy_layer_->SetBounds(gfx::Size(10, 10)); | 453 copy_layer_->SetBounds(gfx::Size(10, 10)); |
| 454 parent_layer_->AddChild(copy_layer_); | 454 parent_layer_->AddChild(copy_layer_); |
| 455 | 455 |
| 456 layer_tree_host()->SetRootLayer(root_); | 456 layer_tree_host()->SetRootLayer(root_); |
| 457 LayerTreeHostCopyRequestTest::SetupTree(); | 457 LayerTreeHostCopyRequestTest::SetupTree(); |
| 458 client_.set_bounds(root_->bounds()); | 458 client_.set_bounds(root_->bounds()); |
| 459 } | 459 } |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 int num_draws_; | 1264 int num_draws_; |
| 1265 bool copy_happened_; | 1265 bool copy_happened_; |
| 1266 bool draw_happened_; | 1266 bool draw_happened_; |
| 1267 }; | 1267 }; |
| 1268 | 1268 |
| 1269 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1269 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
| 1270 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); | 1270 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); |
| 1271 | 1271 |
| 1272 } // namespace | 1272 } // namespace |
| 1273 } // namespace cc | 1273 } // namespace cc |
| OLD | NEW |