| Index: components/mus/gpu/gpu_service_impl.h
|
| diff --git a/components/mus/gpu/gpu_service_impl.h b/components/mus/gpu/gpu_service_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..91045873c23459fd64377b19d1cfd32ad254a742
|
| --- /dev/null
|
| +++ b/components/mus/gpu/gpu_service_impl.h
|
| @@ -0,0 +1,60 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_
|
| +#define COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_
|
| +
|
| +#include "components/mus/public/interfaces/gpu_memory_buffer.mojom.h"
|
| +#include "components/mus/public/interfaces/gpu_service.mojom.h"
|
| +#include "mojo/public/cpp/bindings/interface_request.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| +
|
| +namespace shell {
|
| +class Connection;
|
| +}
|
| +
|
| +namespace mus {
|
| +
|
| +class GpuServiceImpl : public mojom::GpuService {
|
| + public:
|
| + GpuServiceImpl(mojo::InterfaceRequest<mojom::GpuService> request,
|
| + shell::Connection* connection);
|
| + ~GpuServiceImpl() override;
|
| +
|
| + // mojom::GpuService overrides:
|
| + void EstablishGpuChannel(
|
| + const mojom::GpuService::EstablishGpuChannelCallback& callback) override;
|
| +
|
| + void CreateGpuMemoryBuffer(
|
| + mojom::GpuMemoryBufferIdPtr id,
|
| + const gfx::Size& size,
|
| + mojom::BufferFormat format,
|
| + mojom::BufferUsage usage,
|
| + uint64_t surface_id,
|
| + const mojom::GpuService::CreateGpuMemoryBufferCallback& callback)
|
| + override;
|
| +
|
| + void CreateGpuMemoryBufferFromHandle(
|
| + mojom::GpuMemoryBufferHandlePtr buffer_handle,
|
| + mojom::GpuMemoryBufferIdPtr id,
|
| + const gfx::Size& size,
|
| + mojom::BufferFormat format,
|
| + const mojom::GpuService::CreateGpuMemoryBufferFromHandleCallback&
|
| + callback) override;
|
| +
|
| + void DestroyGpuMemoryBuffer(mojom::GpuMemoryBufferIdPtr id,
|
| + const gpu::SyncToken& sync_token) override;
|
| +
|
| + private:
|
| + mojo::StrongBinding<GpuService> binding_;
|
| +
|
| + // A unique client id for constructing the GpuChannel.
|
| + const int32_t client_id_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GpuServiceImpl);
|
| +};
|
| +
|
| +} // namespace mus
|
| +
|
| +#endif // COMPONENTS_MUS_GPU_GPU_SERVICE_IMPL_H_
|
|
|