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

Side by Side Diff: cc/surfaces/direct_compositor_frame_sink_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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/test/fake_channel_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/surfaces/direct_compositor_frame_sink.h" 5 #include "cc/surfaces/direct_compositor_frame_sink.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "cc/output/renderer_settings.h" 9 #include "cc/output/renderer_settings.h"
10 #include "cc/output/texture_mailbox_deleter.h" 10 #include "cc/output/texture_mailbox_deleter.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 std::unique_ptr<RenderPass> render_pass(RenderPass::Create()); 75 std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
76 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect, 76 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect,
77 gfx::Transform()); 77 gfx::Transform());
78 78
79 auto frame_data = base::MakeUnique<DelegatedFrameData>(); 79 auto frame_data = base::MakeUnique<DelegatedFrameData>();
80 frame_data->render_pass_list.push_back(std::move(render_pass)); 80 frame_data->render_pass_list.push_back(std::move(render_pass));
81 81
82 CompositorFrame frame; 82 CompositorFrame frame;
83 frame.delegated_frame_data = std::move(frame_data); 83 frame.delegated_frame_data = std::move(frame_data);
84 84
85 compositor_frame_sink_->SwapBuffers(std::move(frame)); 85 compositor_frame_sink_->SubmitCompositorFrame(std::move(frame));
86 } 86 }
87 87
88 void SetUp() override { 88 void SetUp() override {
89 // Draw the first frame to start in an "unlocked" state. 89 // Draw the first frame to start in an "unlocked" state.
90 SwapBuffersWithDamage(display_rect_); 90 SwapBuffersWithDamage(display_rect_);
91 91
92 EXPECT_EQ(0u, display_output_surface_->num_sent_frames()); 92 EXPECT_EQ(0u, display_output_surface_->num_sent_frames());
93 task_runner_->RunUntilIdle(); 93 task_runner_->RunUntilIdle();
94 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 94 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
95 } 95 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 148 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
149 149
150 SwapBuffersWithDamage(gfx::Rect()); 150 SwapBuffersWithDamage(gfx::Rect());
151 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 151 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
152 task_runner_->RunUntilIdle(); 152 task_runner_->RunUntilIdle();
153 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 153 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
154 } 154 }
155 155
156 } // namespace 156 } // namespace
157 } // namespace cc 157 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/test/fake_channel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698