OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |