| 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_impl.h" | 5 #include "services/ui/gpu/gpu_service_impl.h" |
| 6 | 6 |
| 7 #include "services/shell/public/cpp/connection.h" | 7 #include "services/shell/public/cpp/connection.h" |
| 8 #include "services/ui/common/gpu_type_converters.h" | 8 #include "services/ui/common/gpu_type_converters.h" |
| 9 #include "services/ui/gpu/gpu_service_mus.h" | 9 #include "services/ui/gpu/gpu_service_mus.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 void EstablishGpuChannelDone( | 15 void EstablishGpuChannelDone( |
| 16 const mojom::GpuService::EstablishGpuChannelCallback& callback, | 16 const mojom::GpuService::EstablishGpuChannelCallback& callback, |
| 17 int32_t client_id, | 17 int32_t client_id, |
| 18 const IPC::ChannelHandle& channel_handle) { | 18 const IPC::ChannelHandle& channel_handle) { |
| 19 // TODO(penghuang): Send the real GPUInfo to the client. | 19 // TODO(penghuang): Send the real GPUInfo to the client. |
| 20 callback.Run(client_id, mojom::ChannelHandle::From(channel_handle), | 20 callback.Run(client_id, mojom::ChannelHandle::From(channel_handle), |
| 21 mojom::GpuInfo::From<gpu::GPUInfo>(gpu::GPUInfo())); | 21 mojom::GpuInfo::From<gpu::GPUInfo>(gpu::GPUInfo())); |
| 22 } | 22 } |
| 23 } | 23 } |
| 24 | 24 |
| 25 GpuServiceImpl::GpuServiceImpl( | 25 GpuServiceImpl::GpuServiceImpl( |
| 26 mojo::InterfaceRequest<mojom::GpuService> request, | 26 mojo::InterfaceRequest<mojom::GpuService> request) |
| 27 shell::Connection* connection) | |
| 28 : binding_(this, std::move(request)) {} | 27 : binding_(this, std::move(request)) {} |
| 29 | 28 |
| 30 GpuServiceImpl::~GpuServiceImpl() {} | 29 GpuServiceImpl::~GpuServiceImpl() {} |
| 31 | 30 |
| 32 void GpuServiceImpl::EstablishGpuChannel( | 31 void GpuServiceImpl::EstablishGpuChannel( |
| 33 const mojom::GpuService::EstablishGpuChannelCallback& callback) { | 32 const mojom::GpuService::EstablishGpuChannelCallback& callback) { |
| 34 GpuServiceMus* service = GpuServiceMus::GetInstance(); | 33 GpuServiceMus* service = GpuServiceMus::GetInstance(); |
| 35 // TODO(penghuang): crbug.com/617415 figure out how to generate a meaningful | 34 // TODO(penghuang): crbug.com/617415 figure out how to generate a meaningful |
| 36 // tracing id. | 35 // tracing id. |
| 37 const uint64_t client_tracing_id = 0; | 36 const uint64_t client_tracing_id = 0; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 54 const mojom::GpuService::CreateGpuMemoryBufferCallback& callback) { | 53 const mojom::GpuService::CreateGpuMemoryBufferCallback& callback) { |
| 55 NOTIMPLEMENTED(); | 54 NOTIMPLEMENTED(); |
| 56 } | 55 } |
| 57 | 56 |
| 58 void GpuServiceImpl::DestroyGpuMemoryBuffer(mojom::GpuMemoryBufferIdPtr id, | 57 void GpuServiceImpl::DestroyGpuMemoryBuffer(mojom::GpuMemoryBufferIdPtr id, |
| 59 const gpu::SyncToken& sync_token) { | 58 const gpu::SyncToken& sync_token) { |
| 60 NOTIMPLEMENTED(); | 59 NOTIMPLEMENTED(); |
| 61 } | 60 } |
| 62 | 61 |
| 63 } // namespace ui | 62 } // namespace ui |
| OLD | NEW |