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

Unified Diff: cc/surfaces/surface_unittest.cc

Issue 2848223003: Enforce constant size and device scale factor for surfaces (Closed)
Patch Set: Address comments Created 3 years, 7 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/surfaces/surface_manager.cc ('k') | cc/test/compositor_frame_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_unittest.cc
diff --git a/cc/surfaces/surface_unittest.cc b/cc/surfaces/surface_unittest.cc
index c63c0b031ddee46b72ded2524dea24722b6a907a..beeebfc9fb357e332d054cd77b64458cc855d780 100644
--- a/cc/surfaces/surface_unittest.cc
+++ b/cc/surfaces/surface_unittest.cc
@@ -66,7 +66,6 @@ TEST(SurfaceTest, CopyRequestLifetime) {
LocalSurfaceId local_surface_id(6, base::UnguessableToken::Create());
SurfaceId surface_id(kArbitraryFrameSinkId, local_surface_id);
CompositorFrame frame = test::MakeCompositorFrame();
- frame.render_pass_list.push_back(RenderPass::Create());
support->SubmitCompositorFrame(local_surface_id, std::move(frame));
Surface* surface = manager.GetSurfaceForId(surface_id);
ASSERT_TRUE(!!surface);
@@ -79,13 +78,15 @@ TEST(SurfaceTest, CopyRequestLifetime) {
int max_frame = 3, start_id = 200;
for (int i = 0; i < max_frame; ++i) {
- CompositorFrame frame = test::MakeCompositorFrame();
+ CompositorFrame frame = test::MakeEmptyCompositorFrame();
frame.render_pass_list.push_back(RenderPass::Create());
frame.render_pass_list.back()->id = i * 3 + start_id;
frame.render_pass_list.push_back(RenderPass::Create());
frame.render_pass_list.back()->id = i * 3 + start_id + 1;
frame.render_pass_list.push_back(RenderPass::Create());
- frame.render_pass_list.back()->id = i * 3 + start_id + 2;
+ frame.render_pass_list.back()->SetNew(i * 3 + start_id + 2,
+ gfx::Rect(0, 0, 20, 20), gfx::Rect(),
+ gfx::Transform());
support->SubmitCompositorFrame(local_surface_id, std::move(frame));
}
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | cc/test/compositor_frame_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698