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

Side by Side Diff: services/ui/ws/window_server.cc

Issue 2489003002: Convert mustash use surface references. (Closed)
Patch Set: Rewrite large bits Created 4 years, 1 month 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
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 "services/ui/ws/window_server.h" 5 #include "services/ui/ws/window_server.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 // If the window doesn't have a parent then we have nothing to propagate. 767 // If the window doesn't have a parent then we have nothing to propagate.
768 if (!window) 768 if (!window)
769 return; 769 return;
770 770
771 // Cache the last submitted surface ID in the window server. 771 // Cache the last submitted surface ID in the window server.
772 // DisplayCompositorFrameSink may submit a CompositorFrame without 772 // DisplayCompositorFrameSink may submit a CompositorFrame without
773 // creating a CompositorFrameSinkManager. 773 // creating a CompositorFrameSinkManager.
774 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo( 774 window->GetOrCreateCompositorFrameSinkManager()->SetLatestSurfaceInfo(
775 compositor_frame_sink_type, surface_id, frame_size); 775 compositor_frame_sink_type, surface_id, frame_size);
776 776
777 // FrameGenerator will add an appropriate reference for the new surface.
778 DCHECK(display_manager_->GetDisplayContaining(window));
779 display_manager_->GetDisplayContaining(window)
780 ->platform_display()
781 ->GetFrameGenerator()
782 ->OnSurfaceCreated(surface_id, window);
783
777 // This is only used for testing to observe that a window has a 784 // This is only used for testing to observe that a window has a
778 // CompositorFrame. 785 // CompositorFrame.
779 if (!window_paint_callback_.is_null()) 786 if (!window_paint_callback_.is_null())
780 window_paint_callback_.Run(window); 787 window_paint_callback_.Run(window);
781 788
782 // We only care about propagating default surface IDs. 789 // We only care about propagating default surface IDs.
783 // TODO(fsamuel, sadrul): we should get rid of CompositorFrameSinkTypes. 790 // TODO(fsamuel, sadrul): we should get rid of CompositorFrameSinkTypes.
784 if (compositor_frame_sink_type != mojom::CompositorFrameSinkType::DEFAULT || 791 if (compositor_frame_sink_type != mojom::CompositorFrameSinkType::DEFAULT ||
785 !window->parent()) { 792 !window->parent()) {
786 return; 793 return;
(...skipping 12 matching lines...) Expand all
799 void WindowServer::OnUserIdAdded(const UserId& id) { 806 void WindowServer::OnUserIdAdded(const UserId& id) {
800 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 807 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
801 } 808 }
802 809
803 void WindowServer::OnUserIdRemoved(const UserId& id) { 810 void WindowServer::OnUserIdRemoved(const UserId& id) {
804 activity_monitor_map_.erase(id); 811 activity_monitor_map_.erase(id);
805 } 812 }
806 813
807 } // namespace ws 814 } // namespace ws
808 } // namespace ui 815 } // namespace ui
OLDNEW
« services/ui/ws/frame_generator.cc ('K') | « services/ui/ws/test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698