| 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/output/copy_output_request.h" | 5 #include "cc/output/copy_output_request.h" |
| 6 #include "cc/output/copy_output_result.h" | 6 #include "cc/output/copy_output_result.h" |
| 7 #include "cc/test/fake_content_layer.h" | 7 #include "cc/test/fake_content_layer.h" |
| 8 #include "cc/test/fake_content_layer_client.h" | 8 #include "cc/test/fake_content_layer_client.h" |
| 9 #include "cc/test/fake_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
| 10 #include "cc/test/layer_tree_test.h" | 10 #include "cc/test/layer_tree_test.h" |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 CopyOutputCallback, | 585 CopyOutputCallback, |
| 586 base::Unretained(this)))); | 586 base::Unretained(this)))); |
| 587 break; | 587 break; |
| 588 case 4: | 588 case 4: |
| 589 // With SingleThreadProxy it takes two commits to finally swap after a | 589 // With SingleThreadProxy it takes two commits to finally swap after a |
| 590 // context loss. | 590 // context loss. |
| 591 case 5: | 591 case 5: |
| 592 // Now destroy the CopyOutputResult, releasing the texture inside back | 592 // Now destroy the CopyOutputResult, releasing the texture inside back |
| 593 // to the compositor. | 593 // to the compositor. |
| 594 EXPECT_TRUE(result_); | 594 EXPECT_TRUE(result_); |
| 595 result_.reset(); | 595 result_ = nullptr; |
| 596 | 596 |
| 597 // Check that it is released. | 597 // Check that it is released. |
| 598 ImplThreadTaskRunner()->PostTask( | 598 ImplThreadTaskRunner()->PostTask( |
| 599 FROM_HERE, | 599 FROM_HERE, |
| 600 base::Bind(&LayerTreeHostCopyRequestTestLostOutputSurface:: | 600 base::Bind(&LayerTreeHostCopyRequestTestLostOutputSurface:: |
| 601 CheckNumTextures, | 601 CheckNumTextures, |
| 602 base::Unretained(this), | 602 base::Unretained(this), |
| 603 num_textures_after_loss_ - 1)); | 603 num_textures_after_loss_ - 1)); |
| 604 break; | 604 break; |
| 605 } | 605 } |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 FakeContentLayerClient client_; | 965 FakeContentLayerClient client_; |
| 966 scoped_refptr<FakeContentLayer> root_; | 966 scoped_refptr<FakeContentLayer> root_; |
| 967 scoped_refptr<FakeContentLayer> copy_layer_; | 967 scoped_refptr<FakeContentLayer> copy_layer_; |
| 968 }; | 968 }; |
| 969 | 969 |
| 970 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 970 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
| 971 LayerTreeHostCopyRequestTestShutdownBeforeCopy); | 971 LayerTreeHostCopyRequestTestShutdownBeforeCopy); |
| 972 | 972 |
| 973 } // namespace | 973 } // namespace |
| 974 } // namespace cc | 974 } // namespace cc |
| OLD | NEW |