Chromium Code Reviews| Index: ui/aura/mus/window_tree_client.cc |
| diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc |
| index 233da4df7e06e9473645b9a46992700723fd34e0..4efa8dced76863b273a6f1d85a29eeb284df866b 100644 |
| --- a/ui/aura/mus/window_tree_client.cc |
| +++ b/ui/aura/mus/window_tree_client.cc |
| @@ -614,12 +614,16 @@ void WindowTreeClient::ScheduleInFlightBoundsChange( |
| WindowMus* window, |
| const gfx::Rect& old_bounds, |
| const gfx::Rect& new_bounds) { |
| - // TODO(fsamuel): Allocate a new LocalSurfaceId on size change. |
| const uint32_t change_id = |
| ScheduleInFlightChange(base::MakeUnique<InFlightBoundsChange>( |
| - this, window, old_bounds, base::nullopt)); |
| + this, window, old_bounds, window->GetLocalSurfaceId())); |
| + base::Optional<cc::LocalSurfaceId> local_surface_id; |
| + if ((window->window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM || |
| + window->window_mus_type() == WindowMusType::EMBED_IN_OWNER)) { |
| + local_surface_id = window->GetOrAllocateLocalSurfaceId(new_bounds.size()); |
| + } |
| tree_->SetWindowBounds(change_id, window->server_id(), new_bounds, |
| - base::nullopt); |
| + local_surface_id); |
|
sky
2017/03/29 00:07:35
Please add test coverage that the id sent to the s
Fady Samuel
2017/03/29 22:10:14
Done! Found a bug a fixed it. I've added two tests
|
| } |
| void WindowTreeClient::OnWindowMusCreated(WindowMus* window) { |