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

Side by Side Diff: components/mus/gpu/gpu_service_impl.cc

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « components/mus/gpu/gpu_service_impl.h ('k') | components/mus/gpu/gpu_service_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/mus/gpu/gpu_service_impl.h"
6
7 #include "components/mus/common/gpu_type_converters.h"
8 #include "components/mus/gpu/gpu_service_mus.h"
9 #include "services/shell/public/cpp/connection.h"
10
11 namespace mus {
12
13 namespace {
14
15 void EstablishGpuChannelDone(
16 const mojom::GpuService::EstablishGpuChannelCallback& callback,
17 int32_t client_id,
18 const IPC::ChannelHandle& channel_handle) {
19 // TODO(penghuang): Send the real GPUInfo to the client.
20 callback.Run(client_id, mojom::ChannelHandle::From(channel_handle),
21 mojom::GpuInfo::From<gpu::GPUInfo>(gpu::GPUInfo()));
22 }
23 }
24
25 GpuServiceImpl::GpuServiceImpl(
26 mojo::InterfaceRequest<mojom::GpuService> request,
27 shell::Connection* connection)
28 : binding_(this, std::move(request)) {}
29
30 GpuServiceImpl::~GpuServiceImpl() {}
31
32 void GpuServiceImpl::EstablishGpuChannel(
33 const mojom::GpuService::EstablishGpuChannelCallback& callback) {
34 GpuServiceMus* service = GpuServiceMus::GetInstance();
35 // TODO(penghuang): crbug.com/617415 figure out how to generate a meaningful
36 // tracing id.
37 const uint64_t client_tracing_id = 0;
38 // TODO(penghuang): windows server may want to control those flags.
39 // Add a private interface for windows server.
40 const bool preempts = false;
41 const bool allow_view_command_buffers = false;
42 const bool allow_real_time_streams = false;
43 service->EstablishGpuChannel(
44 client_tracing_id, preempts, allow_view_command_buffers,
45 allow_real_time_streams, base::Bind(&EstablishGpuChannelDone, callback));
46 }
47
48 void GpuServiceImpl::CreateGpuMemoryBuffer(
49 mojom::GpuMemoryBufferIdPtr id,
50 const gfx::Size& size,
51 mojom::BufferFormat format,
52 mojom::BufferUsage usage,
53 uint64_t surface_id,
54 const mojom::GpuService::CreateGpuMemoryBufferCallback& callback) {
55 NOTIMPLEMENTED();
56 }
57
58 void GpuServiceImpl::DestroyGpuMemoryBuffer(mojom::GpuMemoryBufferIdPtr id,
59 const gpu::SyncToken& sync_token) {
60 NOTIMPLEMENTED();
61 }
62
63 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/gpu/gpu_service_impl.h ('k') | components/mus/gpu/gpu_service_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698