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

Side by Side Diff: cc/surfaces/surface_display_output_surface_unittest.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits 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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_display_output_surface.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('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/surface_display_output_surface.h" 5 #include "cc/surfaces/surface_display_output_surface.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 std::unique_ptr<RenderPass> render_pass(RenderPass::Create()); 71 std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
72 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect, 72 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect,
73 gfx::Transform()); 73 gfx::Transform());
74 74
75 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); 75 std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
76 frame_data->render_pass_list.push_back(std::move(render_pass)); 76 frame_data->render_pass_list.push_back(std::move(render_pass));
77 77
78 CompositorFrame frame; 78 CompositorFrame frame;
79 frame.delegated_frame_data = std::move(frame_data); 79 frame.delegated_frame_data = std::move(frame_data);
80 80
81 delegated_output_surface_->SwapBuffers(&frame); 81 delegated_output_surface_->SwapBuffers(std::move(frame));
82 } 82 }
83 83
84 void SetUp() override { 84 void SetUp() override {
85 // Draw the first frame to start in an "unlocked" state. 85 // Draw the first frame to start in an "unlocked" state.
86 SwapBuffersWithDamage(display_rect_); 86 SwapBuffersWithDamage(display_rect_);
87 87
88 EXPECT_EQ(0u, display_output_surface_->num_sent_frames()); 88 EXPECT_EQ(0u, display_output_surface_->num_sent_frames());
89 task_runner_->RunUntilIdle(); 89 task_runner_->RunUntilIdle();
90 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 90 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
91 } 91 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 145 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
146 146
147 SwapBuffersWithDamage(gfx::Rect()); 147 SwapBuffersWithDamage(gfx::Rect());
148 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 148 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
149 task_runner_->RunUntilIdle(); 149 task_runner_->RunUntilIdle();
150 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 150 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
151 } 151 }
152 152
153 } // namespace 153 } // namespace
154 } // namespace cc 154 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_display_output_surface.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698