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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2409923002: cc: Rename SwapBuffers on CompositorFrameSink to SubmitCompositorFrame (Closed)
Patch Set: swap-to-submit: rebase Created 4 years, 2 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_in_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 5c29648ebfb6421fc6d0084d5be13dfafb933b70..de7eb4f281d773882b321171860e5d9cf4446209 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -133,7 +133,7 @@ class LayerTreeHostImplTest : public testing::Test,
void DidLoseCompositorFrameSinkOnImplThread() override {}
void SetBeginFrameSource(BeginFrameSource* source) override {}
- void DidSwapBuffersCompleteOnImplThread() override {}
+ void DidReceiveCompositorFrameAckOnImplThread() override {}
void OnCanDrawStateChanged(bool can_draw) override {
on_can_draw_state_changed_called_ = true;
}
@@ -7918,14 +7918,11 @@ TEST_F(LayerTreeHostImplTest, FarAwayQuadsDontNeedAA) {
class CompositorFrameMetadataTest : public LayerTreeHostImplTest {
public:
- CompositorFrameMetadataTest()
- : swap_buffers_complete_(0) {}
+ CompositorFrameMetadataTest() = default;
- void DidSwapBuffersCompleteOnImplThread() override {
- swap_buffers_complete_++;
- }
+ void DidReceiveCompositorFrameAckOnImplThread() override { acks_received_++; }
- int swap_buffers_complete_;
+ int acks_received_ = 0;
};
TEST_F(CompositorFrameMetadataTest, CompositorFrameAckCountsAsSwapComplete) {
@@ -7938,8 +7935,8 @@ TEST_F(CompositorFrameMetadataTest, CompositorFrameAckCountsAsSwapComplete) {
host_impl_->DidDrawAllLayers(frame);
}
host_impl_->ReclaimResources(ReturnedResourceArray());
- host_impl_->DidSwapBuffersComplete();
- EXPECT_EQ(swap_buffers_complete_, 1);
+ host_impl_->DidReceiveCompositorFrameAck();
+ EXPECT_EQ(acks_received_, 1);
}
class CountingSoftwareDevice : public SoftwareOutputDevice {
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_in_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698