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

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

Issue 2785703002: Aura-Mus: Plumb LocalSurfaceId to ui::Compositor (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/DEPS ('K') | « ui/aura/mus/window_tree_client.h ('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 ebb86ac746c16010556e44ca9b86fee6f97d78ac..99fb274e43a700fe2286c691d61c31274689f408 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -12,8 +12,10 @@
#include "base/auto_reset.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread.h"
+#include "cc/base/switches.h"
#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h"
#include "mojo/public/cpp/bindings/map.h"
#include "services/service_manager/public/cpp/connector.h"
@@ -223,6 +225,9 @@ WindowTreeClient::WindowTreeClient(
discardable_shared_memory_manager_.get());
}
}
+ enable_surface_synchronization_ =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ cc::switches::kEnableSurfaceSynchronization);
}
WindowTreeClient::~WindowTreeClient() {
@@ -593,7 +598,11 @@ void WindowTreeClient::SetWindowBoundsFromServer(
if (IsRoot(window)) {
// WindowTreeHost expects bounds to be in pixels.
GetWindowTreeHostMus(window)->SetBoundsFromServer(revert_bounds_in_pixels);
- // TODO(fsamuel): Propagate |local_surface_id| to ui::Compositor.
+ if (enable_surface_synchronization_ && local_surface_id &&
+ local_surface_id->is_valid()) {
+ window->GetWindow()->GetHost()->compositor()->SetLocalSurfaceId(
+ *local_surface_id);
+ }
return;
}
« ui/aura/mus/DEPS ('K') | « ui/aura/mus/window_tree_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698