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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/window_tree_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 void WindowTreeClient::ScheduleInFlightBoundsChange( | 692 void WindowTreeClient::ScheduleInFlightBoundsChange( |
693 WindowMus* window, | 693 WindowMus* window, |
694 const gfx::Rect& old_bounds, | 694 const gfx::Rect& old_bounds, |
695 const gfx::Rect& new_bounds) { | 695 const gfx::Rect& new_bounds) { |
696 const uint32_t change_id = | 696 const uint32_t change_id = |
697 ScheduleInFlightChange(base::MakeUnique<InFlightBoundsChange>( | 697 ScheduleInFlightChange(base::MakeUnique<InFlightBoundsChange>( |
698 this, window, old_bounds, window->GetLocalSurfaceId())); | 698 this, window, old_bounds, window->GetLocalSurfaceId())); |
699 base::Optional<cc::LocalSurfaceId> local_surface_id; | 699 base::Optional<cc::LocalSurfaceId> local_surface_id; |
700 if (window->window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM || | 700 if (window->window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM || |
701 window->window_mus_type() == WindowMusType::EMBED_IN_OWNER || | 701 window->window_mus_type() == WindowMusType::EMBED_IN_OWNER || |
702 window->window_mus_type() == WindowMusType::DISPLAY_MANUALLY_CREATED) { | 702 window->window_mus_type() == WindowMusType::DISPLAY_MANUALLY_CREATED || |
| 703 window->HasLocalCompositorFrameSink()) { |
703 local_surface_id = window->GetOrAllocateLocalSurfaceId(new_bounds.size()); | 704 local_surface_id = window->GetOrAllocateLocalSurfaceId(new_bounds.size()); |
704 synchronizing_with_child_on_next_frame_ = true; | 705 synchronizing_with_child_on_next_frame_ = true; |
705 } | 706 } |
706 tree_->SetWindowBounds(change_id, window->server_id(), new_bounds, | 707 tree_->SetWindowBounds(change_id, window->server_id(), new_bounds, |
707 local_surface_id); | 708 local_surface_id); |
708 } | 709 } |
709 | 710 |
710 void WindowTreeClient::OnWindowMusCreated(WindowMus* window) { | 711 void WindowTreeClient::OnWindowMusCreated(WindowMus* window) { |
711 if (window->server_id() != kInvalidServerId) | 712 if (window->server_id() != kInvalidServerId) |
712 return; | 713 return; |
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2152 } | 2153 } |
2153 | 2154 |
2154 void WindowTreeClient::OnCompositingLockStateChanged( | 2155 void WindowTreeClient::OnCompositingLockStateChanged( |
2155 ui::Compositor* compositor) {} | 2156 ui::Compositor* compositor) {} |
2156 | 2157 |
2157 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { | 2158 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { |
2158 compositor->RemoveObserver(this); | 2159 compositor->RemoveObserver(this); |
2159 } | 2160 } |
2160 | 2161 |
2161 } // namespace aura | 2162 } // namespace aura |
OLD | NEW |