OLD | NEW |
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 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 client_request = mojo::MakeRequest(&surface_client_ptr); | 2178 client_request = mojo::MakeRequest(&surface_client_ptr); |
2179 wt2()->AttachCompositorFrameSink(window_2_101, | 2179 wt2()->AttachCompositorFrameSink(window_2_101, |
2180 mojo::MakeRequest(&surface_ptr), | 2180 mojo::MakeRequest(&surface_ptr), |
2181 std::move(surface_client_ptr)); | 2181 std::move(surface_client_ptr)); |
2182 cc::CompositorFrame compositor_frame; | 2182 cc::CompositorFrame compositor_frame; |
2183 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); | 2183 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); |
2184 gfx::Rect frame_rect(0, 0, 100, 100); | 2184 gfx::Rect frame_rect(0, 0, 100, 100); |
2185 render_pass->SetNew(1, frame_rect, frame_rect, gfx::Transform()); | 2185 render_pass->SetNew(1, frame_rect, frame_rect, gfx::Transform()); |
2186 compositor_frame.render_pass_list.push_back(std::move(render_pass)); | 2186 compositor_frame.render_pass_list.push_back(std::move(render_pass)); |
2187 compositor_frame.metadata.device_scale_factor = 1.f; | 2187 compositor_frame.metadata.device_scale_factor = 1.f; |
| 2188 compositor_frame.metadata.begin_frame_ack = |
| 2189 cc::BeginFrameAck(0, 1, 1, 0, true); |
2188 cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create()); | 2190 cc::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create()); |
2189 surface_ptr->SubmitCompositorFrame(local_surface_id, | 2191 surface_ptr->SubmitCompositorFrame(local_surface_id, |
2190 std::move(compositor_frame)); | 2192 std::move(compositor_frame)); |
2191 // Make sure the parent connection gets the surface ID. | 2193 // Make sure the parent connection gets the surface ID. |
2192 wt_client1()->WaitForChangeCount(1); | 2194 wt_client1()->WaitForChangeCount(1); |
2193 // Verify that the submitted frame is for |window_2_101|. | 2195 // Verify that the submitted frame is for |window_2_101|. |
2194 EXPECT_EQ(window_2_101_in_ws1, | 2196 EXPECT_EQ(window_2_101_in_ws1, |
2195 changes1()->back().surface_id.frame_sink_id().client_id()); | 2197 changes1()->back().surface_id.frame_sink_id().client_id()); |
2196 } | 2198 } |
2197 | 2199 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 | 2236 |
2235 // TODO(sky): make sure coverage of what was | 2237 // TODO(sky): make sure coverage of what was |
2236 // WindowManagerTest.SecondEmbedRoot_InitService and | 2238 // WindowManagerTest.SecondEmbedRoot_InitService and |
2237 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2239 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
2238 // manager | 2240 // manager |
2239 // tests. | 2241 // tests. |
2240 | 2242 |
2241 } // namespace test | 2243 } // namespace test |
2242 } // namespace ws | 2244 } // namespace ws |
2243 } // namespace ui | 2245 } // namespace ui |
OLD | NEW |