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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 69343011: cc: Rationalize sync points and lost status for returned resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 373f62dbefe45f8a80fa9c4e6286f9156c9e505c..081c82a319bebf531ee8cc89b15e0fa10334a04f 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -378,9 +378,7 @@ class TextureLayerWithMailboxTest : public TextureLayerTest {
virtual void TearDown() {
Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
EXPECT_CALL(test_data_.mock_callback_,
- Release(test_data_.mailbox_name1_,
- test_data_.sync_point1_,
- false)).Times(1);
+ Release(test_data_.mailbox_name1_, 0, false)).Times(1);
TextureLayerTest::TearDown();
}
@@ -406,10 +404,7 @@ TEST_F(TextureLayerWithMailboxTest, ReplaceMailboxOnMainThreadBeforeCommit) {
EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(0);
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1));
EXPECT_CALL(test_data_.mock_callback_,
- Release(test_data_.mailbox_name1_,
- test_data_.sync_point1_,
- false))
- .Times(1);
+ Release(test_data_.mailbox_name1_, 0, false)).Times(1);
test_layer->SetTextureMailbox(
test_data_.mailbox2_,
SingleReleaseCallback::Create(test_data_.release_mailbox2_));
@@ -419,10 +414,7 @@ TEST_F(TextureLayerWithMailboxTest, ReplaceMailboxOnMainThreadBeforeCommit) {
EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(0);
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1));
EXPECT_CALL(test_data_.mock_callback_,
- Release(test_data_.mailbox_name2_,
- test_data_.sync_point2_,
- false))
- .Times(1);
+ Release(test_data_.mailbox_name2_, 0, false)).Times(1);
test_layer->SetTextureMailbox(TextureMailbox(),
scoped_ptr<SingleReleaseCallback>());
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
@@ -1153,11 +1145,12 @@ class TextureLayerImplWithMailboxTest : public TextureLayerTest {
// Test conditions for results of TextureLayerImpl::WillDraw under
// different configurations of different mailbox, texture_id, and draw_mode.
TEST_F(TextureLayerImplWithMailboxTest, TestWillDraw) {
+ EXPECT_CALL(
+ test_data_.mock_callback_,
+ Release(test_data_.mailbox_name1_, test_data_.sync_point1_, false))
+ .Times(0);
EXPECT_CALL(test_data_.mock_callback_,
- Release(test_data_.mailbox_name1_,
- test_data_.sync_point1_,
- false))
- .Times(AnyNumber());
+ Release(test_data_.mailbox_name1_, 0, false)).Times(AnyNumber());
EXPECT_CALL(test_data_.mock_callback_,
Release2(test_data_.shared_memory_.get(), 0, false))
.Times(AnyNumber());
@@ -1303,10 +1296,7 @@ TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
// Test multiple commits without an activation.
EXPECT_CALL(test_data_.mock_callback_,
- Release(test_data_.mailbox_name1_,
- test_data_.sync_point1_,
- false))
- .Times(1);
+ Release(test_data_.mailbox_name1_, 0, false)).Times(1);
pending_layer->SetTextureMailbox(
test_data_.mailbox2_,
SingleReleaseCallback::Create(test_data_.release_mailbox2_));
@@ -1341,10 +1331,7 @@ TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
// Test destructor.
EXPECT_CALL(test_data_.mock_callback_,
- Release(test_data_.mailbox_name1_,
- test_data_.sync_point1_,
- false))
- .Times(1);
+ Release(test_data_.mailbox_name1_, 0, false)).Times(1);
pending_layer->SetTextureMailbox(
test_data_.mailbox1_,
SingleReleaseCallback::Create(test_data_.release_mailbox1_));
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698