| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "cc/debug/test_web_graphics_context_3d.h" | 10 #include "cc/debug/test_web_graphics_context_3d.h" |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 resource_ids_to_transfer.push_back(id); | 772 resource_ids_to_transfer.push_back(id); |
| 773 TransferableResourceArray list; | 773 TransferableResourceArray list; |
| 774 provider->PrepareSendToParent(resource_ids_to_transfer, &list); | 774 provider->PrepareSendToParent(resource_ids_to_transfer, &list); |
| 775 EXPECT_TRUE(provider->InUseByConsumer(id)); | 775 EXPECT_TRUE(provider->InUseByConsumer(id)); |
| 776 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); | 776 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); |
| 777 provider->DeleteResource(id); | 777 provider->DeleteResource(id); |
| 778 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); | 778 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); |
| 779 EXPECT_CALL(test_data_.mock_callback_, | 779 EXPECT_CALL(test_data_.mock_callback_, |
| 780 Release(test_data_.mailbox_name1_, _, false)) | 780 Release(test_data_.mailbox_name1_, _, false)) |
| 781 .Times(1); | 781 .Times(1); |
| 782 provider->ReceiveFromParent(list); | 782 ReturnedResourceArray returned; |
| 783 ReturnResources(list, &returned); |
| 784 provider->ReceiveFromParent(returned); |
| 783 } | 785 } |
| 784 | 786 |
| 785 // Check that ClearClient correctly clears the state so that the impl side | 787 // Check that ClearClient correctly clears the state so that the impl side |
| 786 // doesn't try to use a texture that could have been destroyed. | 788 // doesn't try to use a texture that could have been destroyed. |
| 787 class TextureLayerClientTest | 789 class TextureLayerClientTest |
| 788 : public LayerTreeTest, | 790 : public LayerTreeTest, |
| 789 public TextureLayerClient { | 791 public TextureLayerClient { |
| 790 public: | 792 public: |
| 791 TextureLayerClientTest() | 793 TextureLayerClientTest() |
| 792 : context_(NULL), | 794 : context_(NULL), |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 int callback_count_; | 1116 int callback_count_; |
| 1115 scoped_refptr<Layer> root_; | 1117 scoped_refptr<Layer> root_; |
| 1116 scoped_refptr<TextureLayer> layer_; | 1118 scoped_refptr<TextureLayer> layer_; |
| 1117 }; | 1119 }; |
| 1118 | 1120 |
| 1119 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1121 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
| 1120 TextureLayerWithMailboxImplThreadDeleted); | 1122 TextureLayerWithMailboxImplThreadDeleted); |
| 1121 | 1123 |
| 1122 } // namespace | 1124 } // namespace |
| 1123 } // namespace cc | 1125 } // namespace cc |
| OLD | NEW |