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

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

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

Powered by Google App Engine
This is Rietveld 408576698