Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: cc/layers/texture_layer_unittest.cc

Issue 1144523003: Rename cc::ResourceProvider::ResourceId to cc::ResourceId and move it to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/layers/tiled_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_)); 1079 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1080 impl_layer->DidBecomeActive(); 1080 impl_layer->DidBecomeActive();
1081 EXPECT_TRUE(impl_layer->WillDraw( 1081 EXPECT_TRUE(impl_layer->WillDraw(
1082 DRAW_MODE_HARDWARE, host_impl_.active_tree()->resource_provider())); 1082 DRAW_MODE_HARDWARE, host_impl_.active_tree()->resource_provider()));
1083 impl_layer->DidDraw(host_impl_.active_tree()->resource_provider()); 1083 impl_layer->DidDraw(host_impl_.active_tree()->resource_provider());
1084 impl_layer->SetTextureMailbox(TextureMailbox(), nullptr); 1084 impl_layer->SetTextureMailbox(TextureMailbox(), nullptr);
1085 } 1085 }
1086 1086
1087 TEST_F(TextureLayerImplWithMailboxTest, TestCallbackOnInUseResource) { 1087 TEST_F(TextureLayerImplWithMailboxTest, TestCallbackOnInUseResource) {
1088 ResourceProvider* provider = host_impl_.active_tree()->resource_provider(); 1088 ResourceProvider* provider = host_impl_.active_tree()->resource_provider();
1089 ResourceProvider::ResourceId id = provider->CreateResourceFromTextureMailbox( 1089 ResourceId id = provider->CreateResourceFromTextureMailbox(
1090 test_data_.mailbox1_, 1090 test_data_.mailbox1_,
1091 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_)); 1091 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1092 provider->AllocateForTesting(id); 1092 provider->AllocateForTesting(id);
1093 1093
1094 // Transfer some resources to the parent. 1094 // Transfer some resources to the parent.
1095 ResourceProvider::ResourceIdArray resource_ids_to_transfer; 1095 ResourceProvider::ResourceIdArray resource_ids_to_transfer;
1096 resource_ids_to_transfer.push_back(id); 1096 resource_ids_to_transfer.push_back(id);
1097 TransferableResourceArray list; 1097 TransferableResourceArray list;
1098 provider->PrepareSendToParent(resource_ids_to_transfer, &list); 1098 provider->PrepareSendToParent(resource_ids_to_transfer, &list);
1099 EXPECT_TRUE(provider->InUseByConsumer(id)); 1099 EXPECT_TRUE(provider->InUseByConsumer(id));
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 int callback_count_; 1542 int callback_count_;
1543 scoped_refptr<Layer> root_; 1543 scoped_refptr<Layer> root_;
1544 scoped_refptr<TextureLayer> layer_; 1544 scoped_refptr<TextureLayer> layer_;
1545 }; 1545 };
1546 1546
1547 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( 1547 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
1548 TextureLayerWithMailboxImplThreadDeleted); 1548 TextureLayerWithMailboxImplThreadDeleted);
1549 1549
1550 } // namespace 1550 } // namespace
1551 } // namespace cc 1551 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/layers/tiled_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698