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

Unified Diff: services/ui/ws/window_server.cc

Issue 2290363002: services/ui: Set the gpu_channel_ to new added displays. (Closed)
Patch Set: Created 4 years, 4 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 | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index cf1f62094a075df020d9e48bbd57a91f6c517bde..dd5e3cae6261063b7fe094896a1deb36b3d9f6c9 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -484,8 +484,11 @@ gfx::Rect WindowServer::GetCurrentMoveLoopRevertBounds() {
return gfx::Rect();
}
-void WindowServer::OnFirstDisplayReady() {
- delegate_->OnFirstDisplayReady();
+void WindowServer::OnDisplayReady(Display* display, bool is_first) {
+ if (gpu_channel_)
+ display->platform_display()->OnGpuChannelEstablished(gpu_channel_);
+ if (is_first)
+ delegate_->OnFirstDisplayReady();
}
void WindowServer::OnNoMoreDisplays() {
@@ -768,9 +771,10 @@ void WindowServer::OnTransientWindowRemoved(ServerWindow* window,
void WindowServer::OnGpuChannelEstablished(
scoped_refptr<gpu::GpuChannelHost> gpu_channel) {
+ gpu_channel_ = std::move(gpu_channel);
const std::set<Display*>& displays = display_manager()->displays();
for (auto* display : displays)
- display->platform_display()->OnGpuChannelEstablished(gpu_channel);
+ display->platform_display()->OnGpuChannelEstablished(gpu_channel_);
}
void WindowServer::OnActiveUserIdChanged(const UserId& previously_active_id,
« no previous file with comments | « services/ui/ws/window_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698