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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 2151433004: cc: Make LayerTreeHostImpl::SwapBuffers not virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removedidswap
Patch Set: novirtualswapbuffers: . Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 3a13f3d899c356dd4160e4882860afd6b447ba1e..448249da16b03c25122a966f15418b365b8a42e8 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -1066,9 +1066,6 @@ class TextureLayerNoExtraCommitForMailboxTest
}
void MailboxReleased(const gpu::SyncToken& sync_token, bool lost_resource) {
- // Source frame number during callback is the same as the source frame
danakj 2016/07/13 21:50:17 Resources are now returned asynchronously from any
- // on which it was released.
- EXPECT_EQ(1, layer_tree_host()->source_frame_number());
EXPECT_TRUE(sync_token.HasData());
EndTest();
}
@@ -1105,30 +1102,14 @@ class TextureLayerNoExtraCommitForMailboxTest
}
}
- void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
- ASSERT_TRUE(result);
- DelegatedFrameData* delegated_frame_data =
- output_surface()->last_sent_frame()->delegated_frame_data.get();
- if (!delegated_frame_data)
- return;
-
- // Return all resources immediately.
danakj 2016/07/13 21:50:17 This moved into FakeOutputSurface to happen automa
- TransferableResourceArray resources_to_return =
- output_surface()->resources_held_by_parent();
-
- CompositorFrameAck ack;
- for (size_t i = 0; i < resources_to_return.size(); ++i)
- output_surface()->ReturnResource(resources_to_return[i].id, &ack);
- host_impl->ReclaimResources(&ack);
- }
-
void AfterTest() override {}
private:
scoped_refptr<TextureLayer> texture_layer_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerNoExtraCommitForMailboxTest);
+SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(
+ TextureLayerNoExtraCommitForMailboxTest);
// Checks that changing a mailbox in the client for a TextureLayer that's
// invisible correctly works and uses the new mailbox as soon as the layer
@@ -1242,23 +1223,6 @@ class TextureLayerChangeInvisibleMailboxTest
}
}
- void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
- ASSERT_TRUE(result);
- DelegatedFrameData* delegated_frame_data =
- output_surface()->last_sent_frame()->delegated_frame_data.get();
- if (!delegated_frame_data)
- return;
-
- // Return all resources immediately.
- TransferableResourceArray resources_to_return =
- output_surface()->resources_held_by_parent();
-
- CompositorFrameAck ack;
- for (size_t i = 0; i < resources_to_return.size(); ++i)
- output_surface()->ReturnResource(resources_to_return[i].id, &ack);
- host_impl->ReclaimResources(&ack);
- }
-
void AfterTest() override {}
private:

Powered by Google App Engine
This is Rietveld 408576698