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

Side by Side Diff: services/ui/gpu/gpu_service.cc

Issue 2610783003: mus: Make sure window parenting happens in the window server. (Closed)
Patch Set: . Created 3 years, 11 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 | « no previous file | services/ui/gpu/interfaces/gpu_host.mojom » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/gpu/gpu_service.h" 5 #include "services/ui/gpu/gpu_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void GpuService::StoreShaderToDisk(int client_id, 137 void GpuService::StoreShaderToDisk(int client_id,
138 const std::string& key, 138 const std::string& key,
139 const std::string& shader) { 139 const std::string& shader) {
140 gpu_host_->StoreShaderToDisk(client_id, key, shader); 140 gpu_host_->StoreShaderToDisk(client_id, key, shader);
141 } 141 }
142 142
143 #if defined(OS_WIN) 143 #if defined(OS_WIN)
144 void GpuService::SendAcceleratedSurfaceCreatedChildWindow( 144 void GpuService::SendAcceleratedSurfaceCreatedChildWindow(
145 gpu::SurfaceHandle parent_window, 145 gpu::SurfaceHandle parent_window,
146 gpu::SurfaceHandle child_window) { 146 gpu::SurfaceHandle child_window) {
147 ::SetParent(child_window, parent_window); 147 gpu_host_->SetChildSurface(parent_window, child_window);
148 } 148 }
149 #endif 149 #endif
150 150
151 void GpuService::SetActiveURL(const GURL& url) { 151 void GpuService::SetActiveURL(const GURL& url) {
152 // TODO(penghuang): implement this function. 152 // TODO(penghuang): implement this function.
153 } 153 }
154 154
155 void GpuService::EstablishGpuChannel( 155 void GpuService::EstablishGpuChannel(
156 int32_t client_id, 156 int32_t client_id,
157 uint64_t client_tracing_id, 157 uint64_t client_tracing_id,
(...skipping 12 matching lines...) Expand all
170 mojo::ScopedMessagePipeHandle channel_handle; 170 mojo::ScopedMessagePipeHandle channel_handle;
171 IPC::ChannelHandle handle = gpu_channel_manager_->EstablishChannel( 171 IPC::ChannelHandle handle = gpu_channel_manager_->EstablishChannel(
172 client_id, client_tracing_id, preempts, allow_view_command_buffers, 172 client_id, client_tracing_id, preempts, allow_view_command_buffers,
173 allow_real_time_streams); 173 allow_real_time_streams);
174 channel_handle.reset(handle.mojo_handle); 174 channel_handle.reset(handle.mojo_handle);
175 media_gpu_channel_manager_->AddChannel(client_id); 175 media_gpu_channel_manager_->AddChannel(client_id);
176 callback.Run(std::move(channel_handle)); 176 callback.Run(std::move(channel_handle));
177 } 177 }
178 178
179 } // namespace ui 179 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | services/ui/gpu/interfaces/gpu_host.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698