| 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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2152 | 2152 |
| 2153 // Submit a CompositorFrame to window_2_101 and make sure server gets it. | 2153 // Submit a CompositorFrame to window_2_101 and make sure server gets it. |
| 2154 cc::mojom::MojoCompositorFrameSinkPtr surface_ptr; | 2154 cc::mojom::MojoCompositorFrameSinkPtr surface_ptr; |
| 2155 cc::mojom::MojoCompositorFrameSinkClientRequest client_request; | 2155 cc::mojom::MojoCompositorFrameSinkClientRequest client_request; |
| 2156 cc::mojom::MojoCompositorFrameSinkClientPtr surface_client_ptr; | 2156 cc::mojom::MojoCompositorFrameSinkClientPtr surface_client_ptr; |
| 2157 client_request = mojo::GetProxy(&surface_client_ptr); | 2157 client_request = mojo::GetProxy(&surface_client_ptr); |
| 2158 wt2()->AttachCompositorFrameSink( | 2158 wt2()->AttachCompositorFrameSink( |
| 2159 window_2_101, mojom::CompositorFrameSinkType::DEFAULT, | 2159 window_2_101, mojom::CompositorFrameSinkType::DEFAULT, |
| 2160 mojo::GetProxy(&surface_ptr), std::move(surface_client_ptr)); | 2160 mojo::GetProxy(&surface_ptr), std::move(surface_client_ptr)); |
| 2161 cc::CompositorFrame compositor_frame; | 2161 cc::CompositorFrame compositor_frame; |
| 2162 compositor_frame.delegated_frame_data = |
| 2163 base::MakeUnique<cc::DelegatedFrameData>(); |
| 2162 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); | 2164 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); |
| 2163 gfx::Rect frame_rect(0, 0, 100, 100); | 2165 gfx::Rect frame_rect(0, 0, 100, 100); |
| 2164 render_pass->SetNew(cc::RenderPassId(1, 1), frame_rect, frame_rect, | 2166 render_pass->SetNew(cc::RenderPassId(1, 1), frame_rect, frame_rect, |
| 2165 gfx::Transform()); | 2167 gfx::Transform()); |
| 2166 compositor_frame.render_pass_list.push_back(std::move(render_pass)); | 2168 compositor_frame.delegated_frame_data->render_pass_list.push_back( |
| 2169 std::move(render_pass)); |
| 2167 surface_ptr->SubmitCompositorFrame(std::move(compositor_frame)); | 2170 surface_ptr->SubmitCompositorFrame(std::move(compositor_frame)); |
| 2168 // Make sure the parent connection gets the surface ID. | 2171 // Make sure the parent connection gets the surface ID. |
| 2169 wt_client1()->WaitForChangeCount(1); | 2172 wt_client1()->WaitForChangeCount(1); |
| 2170 // Verify that the submitted frame is for |window_2_101|. | 2173 // Verify that the submitted frame is for |window_2_101|. |
| 2171 EXPECT_EQ(window_2_101_in_ws1, | 2174 EXPECT_EQ(window_2_101_in_ws1, |
| 2172 changes1()->back().surface_id.frame_sink_id().client_id()); | 2175 changes1()->back().surface_id.frame_sink_id().client_id()); |
| 2173 } | 2176 } |
| 2174 | 2177 |
| 2175 // Verifies when an unknown window with a known child is added to a hierarchy | 2178 // Verifies when an unknown window with a known child is added to a hierarchy |
| 2176 // the known child is identified in the WindowData. | 2179 // the known child is identified in the WindowData. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2211 | 2214 |
| 2212 // TODO(sky): make sure coverage of what was | 2215 // TODO(sky): make sure coverage of what was |
| 2213 // WindowManagerTest.SecondEmbedRoot_InitService and | 2216 // WindowManagerTest.SecondEmbedRoot_InitService and |
| 2214 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2217 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
| 2215 // manager | 2218 // manager |
| 2216 // tests. | 2219 // tests. |
| 2217 | 2220 |
| 2218 } // namespace test | 2221 } // namespace test |
| 2219 } // namespace ws | 2222 } // namespace ws |
| 2220 } // namespace ui | 2223 } // namespace ui |
| OLD | NEW |