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

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

Issue 2136413002: Update Surface ID Terminology (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix webkit_unit_tests Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/server_window_surface_manager.h" 5 #include "services/ui/ws/server_window_surface_manager.h"
6 6
7 #include "services/ui/surfaces/surfaces_state.h" 7 #include "services/ui/surfaces/surfaces_state.h"
8 #include "services/ui/ws/server_window.h" 8 #include "services/ui/ws/server_window.h"
9 #include "services/ui/ws/server_window_delegate.h" 9 #include "services/ui/ws/server_window_delegate.h"
10 #include "services/ui/ws/server_window_surface.h" 10 #include "services/ui/ws/server_window_surface.h"
11 11
12 namespace ui { 12 namespace ui {
13 namespace ws { 13 namespace ws {
14 14
15 ServerWindowSurfaceManager::ServerWindowSurfaceManager(ServerWindow* window) 15 ServerWindowSurfaceManager::ServerWindowSurfaceManager(ServerWindow* window)
16 : window_(window), 16 : window_(window),
17 surface_id_allocator_( 17 surface_id_allocator_(
18 window->delegate()->GetSurfacesState()->next_id_namespace()), 18 0 /* gpu_id */,
19 window->delegate()->GetSurfacesState()->next_client_id()),
19 waiting_for_initial_frames_( 20 waiting_for_initial_frames_(
20 window_->properties().count(ui::mojom::kWaitForUnderlay_Property) > 21 window_->properties().count(ui::mojom::kWaitForUnderlay_Property) >
21 0) { 22 0) {
22 surface_id_allocator_.RegisterSurfaceIdNamespace(GetSurfaceManager()); 23 surface_id_allocator_.RegisterSurfaceClientId(GetSurfaceManager());
23 } 24 }
24 25
25 ServerWindowSurfaceManager::~ServerWindowSurfaceManager() { 26 ServerWindowSurfaceManager::~ServerWindowSurfaceManager() {
26 // Explicitly clear the type to surface manager so that this manager 27 // Explicitly clear the type to surface manager so that this manager
27 // is still valid prior during ~ServerWindowSurface. 28 // is still valid prior during ~ServerWindowSurface.
28 type_to_surface_map_.clear(); 29 type_to_surface_map_.clear();
29 } 30 }
30 31
31 bool ServerWindowSurfaceManager::ShouldDraw() { 32 bool ServerWindowSurfaceManager::ShouldDraw() {
32 if (!waiting_for_initial_frames_) 33 if (!waiting_for_initial_frames_)
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return last_submitted_frame_size.width() >= window_->bounds().width() && 94 return last_submitted_frame_size.width() >= window_->bounds().width() &&
94 last_submitted_frame_size.height() >= window_->bounds().height(); 95 last_submitted_frame_size.height() >= window_->bounds().height();
95 } 96 }
96 97
97 cc::SurfaceId ServerWindowSurfaceManager::GenerateId() { 98 cc::SurfaceId ServerWindowSurfaceManager::GenerateId() {
98 return surface_id_allocator_.GenerateId(); 99 return surface_id_allocator_.GenerateId();
99 } 100 }
100 101
101 } // namespace ws 102 } // namespace ws
102 } // namespace ui 103 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698