OLD | NEW |
| (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 #ifndef COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_ | |
6 #define COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_ | |
7 | |
8 #include "components/mus/public/interfaces/gpu_memory_buffer.mojom.h" | |
9 #include "components/mus/public/interfaces/gpu_service.mojom.h" | |
10 #include "mojo/public/cpp/bindings/interface_request.h" | |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | |
12 | |
13 namespace shell { | |
14 class Connection; | |
15 } | |
16 | |
17 namespace mus { | |
18 | |
19 class GpuServiceImpl : public mojom::GpuService { | |
20 public: | |
21 GpuServiceImpl(mojo::InterfaceRequest<mojom::GpuService> request, | |
22 shell::Connection* connection); | |
23 ~GpuServiceImpl() override; | |
24 | |
25 // mojom::GpuService overrides: | |
26 void EstablishGpuChannel( | |
27 const mojom::GpuService::EstablishGpuChannelCallback& callback) override; | |
28 | |
29 void CreateGpuMemoryBuffer( | |
30 mojom::GpuMemoryBufferIdPtr id, | |
31 const gfx::Size& size, | |
32 mojom::BufferFormat format, | |
33 mojom::BufferUsage usage, | |
34 uint64_t surface_id, | |
35 const mojom::GpuService::CreateGpuMemoryBufferCallback& callback) | |
36 override; | |
37 | |
38 void DestroyGpuMemoryBuffer(mojom::GpuMemoryBufferIdPtr id, | |
39 const gpu::SyncToken& sync_token) override; | |
40 | |
41 private: | |
42 mojo::StrongBinding<GpuService> binding_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(GpuServiceImpl); | |
45 }; | |
46 | |
47 } // namespace mus | |
48 | |
49 #endif // COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_ | |
OLD | NEW |