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 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2146 EXPECT_EQ("HierarchyChanged window=" + IdToString(window_2_101_in_ws1) + | 2146 EXPECT_EQ("HierarchyChanged window=" + IdToString(window_2_101_in_ws1) + |
2147 " old_parent=null new_parent=" + IdToString(window_1_100), | 2147 " old_parent=null new_parent=" + IdToString(window_1_100), |
2148 SingleChangeToDescription(*changes1())); | 2148 SingleChangeToDescription(*changes1())); |
2149 changes1()->clear(); | 2149 changes1()->clear(); |
2150 | 2150 |
2151 // Submit a CompositorFrame to window_2_101 and make sure server gets it. | 2151 // Submit a CompositorFrame to window_2_101 and make sure server gets it. |
2152 cc::mojom::MojoCompositorFrameSinkPtr surface_ptr; | 2152 cc::mojom::MojoCompositorFrameSinkPtr surface_ptr; |
2153 cc::mojom::MojoCompositorFrameSinkClientRequest client_request; | 2153 cc::mojom::MojoCompositorFrameSinkClientRequest client_request; |
2154 cc::mojom::MojoCompositorFrameSinkClientPtr surface_client_ptr; | 2154 cc::mojom::MojoCompositorFrameSinkClientPtr surface_client_ptr; |
2155 client_request = mojo::GetProxy(&surface_client_ptr); | 2155 client_request = mojo::GetProxy(&surface_client_ptr); |
2156 wt2()->AttachSurface(window_2_101, mojom::SurfaceType::DEFAULT, | 2156 wt2()->AttachCompositorFrameSink( |
2157 mojo::GetProxy(&surface_ptr), | 2157 window_2_101, mojom::CompositorFrameSinkType::DEFAULT, |
2158 std::move(surface_client_ptr)); | 2158 mojo::GetProxy(&surface_ptr), std::move(surface_client_ptr)); |
2159 cc::CompositorFrame compositor_frame; | 2159 cc::CompositorFrame compositor_frame; |
2160 compositor_frame.delegated_frame_data = | 2160 compositor_frame.delegated_frame_data = |
2161 base::MakeUnique<cc::DelegatedFrameData>(); | 2161 base::MakeUnique<cc::DelegatedFrameData>(); |
2162 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); | 2162 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); |
2163 gfx::Rect frame_rect(0, 0, 100, 100); | 2163 gfx::Rect frame_rect(0, 0, 100, 100); |
2164 render_pass->SetNew(cc::RenderPassId(1, 1), frame_rect, frame_rect, | 2164 render_pass->SetNew(cc::RenderPassId(1, 1), frame_rect, frame_rect, |
2165 gfx::Transform()); | 2165 gfx::Transform()); |
2166 compositor_frame.delegated_frame_data->render_pass_list.push_back( | 2166 compositor_frame.delegated_frame_data->render_pass_list.push_back( |
2167 std::move(render_pass)); | 2167 std::move(render_pass)); |
2168 surface_ptr->SubmitCompositorFrame(std::move(compositor_frame)); | 2168 surface_ptr->SubmitCompositorFrame(std::move(compositor_frame)); |
(...skipping 10 matching lines...) Expand all Loading... |
2179 | 2179 |
2180 // TODO(sky): make sure coverage of what was | 2180 // TODO(sky): make sure coverage of what was |
2181 // WindowManagerTest.SecondEmbedRoot_InitService and | 2181 // WindowManagerTest.SecondEmbedRoot_InitService and |
2182 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2182 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
2183 // manager | 2183 // manager |
2184 // tests. | 2184 // tests. |
2185 | 2185 |
2186 } // namespace test | 2186 } // namespace test |
2187 } // namespace ws | 2187 } // namespace ws |
2188 } // namespace ui | 2188 } // namespace ui |
OLD | NEW |