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