| Index: gpu/ipc/client/gpu_memory_buffer_impl_direct_composition.h
|
| diff --git a/gpu/ipc/client/gpu_memory_buffer_impl_direct_composition.h b/gpu/ipc/client/gpu_memory_buffer_impl_direct_composition.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ec846c6379193a7dcb493ce07efb31f833b97c7c
|
| --- /dev/null
|
| +++ b/gpu/ipc/client/gpu_memory_buffer_impl_direct_composition.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2017 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 GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_DIRECT_COMPOSITION_H_
|
| +#define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_DIRECT_COMPOSITION_H_
|
| +
|
| +#include "gpu/gpu_export.h"
|
| +#include "gpu/ipc/client/gpu_memory_buffer_impl.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +// DirectComposition GpuMemoryBuffers can't be mapped from the client, so this
|
| +// class just holds on to the handle so the GPU process can refer to it.
|
| +class GPU_EXPORT GpuMemoryBufferImplDirectComposition
|
| + : public GpuMemoryBufferImpl {
|
| + public:
|
| + GpuMemoryBufferImplDirectComposition(const gfx::Size& size,
|
| + gfx::GpuMemoryBufferHandle handle,
|
| + gfx::BufferFormat format,
|
| + const DestructionCallback& callback);
|
| +
|
| + ~GpuMemoryBufferImplDirectComposition() override;
|
| +
|
| + bool Map() override;
|
| + void* memory(size_t plane) override;
|
| + void Unmap() override;
|
| + int stride(size_t plane) const override;
|
| + void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override;
|
| + gfx::GpuMemoryBufferHandle GetHandle() const override;
|
| +
|
| + private:
|
| + gfx::GpuMemoryBufferHandle handle_;
|
| +};
|
| +
|
| +} // namespace gpu
|
| +
|
| +#endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_DIRECT_COMPOSITION_H_
|
|
|