| Index: content/gpu/gpu_memory_buffer_service.h
|
| diff --git a/content/gpu/gpu_memory_buffer_service.h b/content/gpu/gpu_memory_buffer_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c37cd3e4c741caf5468e33c09d6e18f629a3c90f
|
| --- /dev/null
|
| +++ b/content/gpu/gpu_memory_buffer_service.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2015 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 CONTENT_GPU_GPU_MEMORY_BUFFER_SERVICE_H_
|
| +#define CONTENT_GPU_GPU_MEMORY_BUFFER_SERVICE_H_
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "content/gpu/gpu_memory_buffer_service_ipc_transport.h"
|
| +#include "ipc/message_filter.h"
|
| +
|
| +namespace content {
|
| +
|
| +class GpuMemoryBufferFactory;
|
| +struct CreateGpuMemoryBufferFromHandleParams;
|
| +struct CreateGpuMemoryBufferParams;
|
| +
|
| +// Message filter used to to handle GpuMsg_CreateGpuMemoryBuffer messages on
|
| +// the IO thread. This allows the UI thread in the browser process to remain
|
| +// fast at all times.
|
| +class GpuMemoryBufferService
|
| + : public GpuMemoryBufferServiceIPCTransport::Client {
|
| + public:
|
| + explicit GpuMemoryBufferService(
|
| + GpuMemoryBufferFactory* gpu_memory_buffer_factory);
|
| +
|
| + GpuMemoryBufferServiceIPCTransport* transport() { return transport_.get(); }
|
| +
|
| + private:
|
| + ~GpuMemoryBufferService() override;
|
| +
|
| + // GpuMemoryBufferServiceIPCTransport::Client:
|
| + void OnConnectionClosed() override;
|
| + void OnCreateGpuMemoryBuffer(
|
| + const CreateGpuMemoryBufferParams& params) override;
|
| + void OnCreateGpuMemoryBufferFromHandle(
|
| + const CreateGpuMemoryBufferFromHandleParams& params) override;
|
| +
|
| + scoped_ptr<GpuMemoryBufferServiceIPCTransport> transport_;
|
| + GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_GPU_GPU_MEMROY_BUFFER_SERVICE_H_
|
|
|