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

Side by Side 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, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 1293
1294 window->SetPredefinedCursorFromServer(cursor); 1294 window->SetPredefinedCursorFromServer(cursor);
1295 } 1295 }
1296 1296
1297 void WindowTreeClient::OnWindowSurfaceChanged( 1297 void WindowTreeClient::OnWindowSurfaceChanged(
1298 Id window_id, 1298 Id window_id,
1299 const cc::SurfaceInfo& surface_info) { 1299 const cc::SurfaceInfo& surface_info) {
1300 WindowMus* window = GetWindowByServerId(window_id); 1300 WindowMus* window = GetWindowByServerId(window_id);
1301 if (!window) 1301 if (!window)
1302 return; 1302 return;
1303 window->SetPrimarySurfaceInfo(surface_info); 1303 if (enable_surface_synchronization_) {
1304 // If surface synchronization is enabled, and the parent is informed
1305 // of a child's surface then that surface ID is guaranteed to be available
1306 // in the display compositor so we set it as the fallback. If surface
1307 // synchronization is enabled, the primary SurfaceInfo is created by the
1308 // embedder, and the LocalSurfaceId is allocated by the embedder.
1309 window->SetFallbackSurfaceInfo(surface_info);
1310 } else {
1311 // If surface synchronization is disabled, fallback SurfaceInfos are never
1312 // used.
1313 window->SetPrimarySurfaceInfo(surface_info);
1314 }
1304 } 1315 }
1305 1316
1306 void WindowTreeClient::OnDragDropStart( 1317 void WindowTreeClient::OnDragDropStart(
1307 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) { 1318 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) {
1308 drag_drop_controller_->OnDragDropStart(mojo::UnorderedMapToMap(mime_data)); 1319 drag_drop_controller_->OnDragDropStart(mojo::UnorderedMapToMap(mime_data));
1309 } 1320 }
1310 1321
1311 void WindowTreeClient::OnDragEnter(Id window_id, 1322 void WindowTreeClient::OnDragEnter(Id window_id,
1312 uint32_t key_state, 1323 uint32_t key_state,
1313 const gfx::Point& position, 1324 const gfx::Point& position,
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1959 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1949 this, capture_synchronizer_.get(), window)); 1960 this, capture_synchronizer_.get(), window));
1950 } 1961 }
1951 1962
1952 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1963 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1953 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1964 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1954 this, focus_synchronizer_.get(), window)); 1965 this, focus_synchronizer_.get(), window));
1955 } 1966 }
1956 1967
1957 } // namespace aura 1968 } // namespace aura
OLDNEW
« 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