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

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

Issue 2790673003: Aura-Mus: Enable Surface Synchronization behind flag (Closed)
Patch Set: Addressed Sadrul's comments 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
« no previous file with comments | « ui/aura/mus/window_port_mus.cc ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | 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 c3bdece523a654b38ceff5cfb6df6c1b0b94852b..36c391c82004fbf21180ec616d417049593d6ace 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -1300,7 +1300,18 @@ void WindowTreeClient::OnWindowSurfaceChanged(
WindowMus* window = GetWindowByServerId(window_id);
if (!window)
return;
- window->SetPrimarySurfaceInfo(surface_info);
+ if (enable_surface_synchronization_) {
+ // If surface synchronization is enabled, and the parent is informed
+ // of a child's surface then that surface ID is guaranteed to be available
+ // in the display compositor so we set it as the fallback. If surface
+ // synchronization is enabled, the primary SurfaceInfo is created by the
+ // embedder, and the LocalSurfaceId is allocated by the embedder.
+ window->SetFallbackSurfaceInfo(surface_info);
+ } else {
+ // If surface synchronization is disabled, fallback SurfaceInfos are never
+ // used.
+ window->SetPrimarySurfaceInfo(surface_info);
+ }
}
void WindowTreeClient::OnDragDropStart(
« no previous file with comments | « ui/aura/mus/window_port_mus.cc ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698