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

Side by Side Diff: services/ui/ws/window_tree_client_unittest.cc

Issue 2755463002: [cc] Fix CompositorFrameSinkSupport BeginFrameAck interface. (Closed)
Patch Set: sync Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 client_request = mojo::MakeRequest(&surface_client_ptr); 2195 client_request = mojo::MakeRequest(&surface_client_ptr);
2196 wt2()->AttachCompositorFrameSink(window_2_101, 2196 wt2()->AttachCompositorFrameSink(window_2_101,
2197 mojo::MakeRequest(&surface_ptr), 2197 mojo::MakeRequest(&surface_ptr),
2198 std::move(surface_client_ptr)); 2198 std::move(surface_client_ptr));
2199 cc::CompositorFrame compositor_frame; 2199 cc::CompositorFrame compositor_frame;
2200 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); 2200 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
2201 gfx::Rect frame_rect(0, 0, 100, 100); 2201 gfx::Rect frame_rect(0, 0, 100, 100);
2202 render_pass->SetNew(1, frame_rect, frame_rect, gfx::Transform()); 2202 render_pass->SetNew(1, frame_rect, frame_rect, gfx::Transform());
2203 compositor_frame.render_pass_list.push_back(std::move(render_pass)); 2203 compositor_frame.render_pass_list.push_back(std::move(render_pass));
2204 compositor_frame.metadata.device_scale_factor = 1.f; 2204 compositor_frame.metadata.device_scale_factor = 1.f;
2205 compositor_frame.metadata.begin_frame_ack =
2206 cc::BeginFrameAck(0, 1, 1, 0, true);
2205 cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create()); 2207 cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create());
2206 surface_ptr->SubmitCompositorFrame(local_surface_id, 2208 surface_ptr->SubmitCompositorFrame(local_surface_id,
2207 std::move(compositor_frame)); 2209 std::move(compositor_frame));
2208 // Make sure the parent connection gets the surface ID. 2210 // Make sure the parent connection gets the surface ID.
2209 wt_client1()->WaitForChangeCount(1); 2211 wt_client1()->WaitForChangeCount(1);
2210 // Verify that the submitted frame is for |window_2_101|. 2212 // Verify that the submitted frame is for |window_2_101|.
2211 EXPECT_EQ(window_2_101_in_ws1, 2213 EXPECT_EQ(window_2_101_in_ws1,
2212 changes1()->back().surface_id.frame_sink_id().client_id()); 2214 changes1()->back().surface_id.frame_sink_id().client_id());
2213 } 2215 }
2214 2216
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 2253
2252 // TODO(sky): make sure coverage of what was 2254 // TODO(sky): make sure coverage of what was
2253 // WindowManagerTest.SecondEmbedRoot_InitService and 2255 // WindowManagerTest.SecondEmbedRoot_InitService and
2254 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window 2256 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window
2255 // manager 2257 // manager
2256 // tests. 2258 // tests.
2257 2259
2258 } // namespace test 2260 } // namespace test
2259 } // namespace ws 2261 } // namespace ws
2260 } // namespace ui 2262 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698