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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2780043002: Aura-Mus: Allocate a LocalSurfaceId on size change (Closed)
Patch Set: Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« ui/aura/mus/window_mus.h ('K') | « ui/aura/mus/window_port_mus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« ui/aura/mus/window_mus.h ('K') | « ui/aura/mus/window_port_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698