| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_DIRECT_COMPOSITION_H_ |
| 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_DIRECT_COMPOSITION_H_ |
| 7 |
| 8 #include "gpu/gpu_export.h" |
| 9 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" |
| 10 |
| 11 namespace gpu { |
| 12 |
| 13 // DirectComposition GpuMemoryBuffers can't be mapped from the client, so this |
| 14 // class just holds on to the handle so the GPU process can refer to it. |
| 15 class GPU_EXPORT GpuMemoryBufferImplDirectComposition |
| 16 : public GpuMemoryBufferImpl { |
| 17 public: |
| 18 GpuMemoryBufferImplDirectComposition(const gfx::Size& size, |
| 19 gfx::GpuMemoryBufferHandle handle, |
| 20 gfx::BufferFormat format, |
| 21 const DestructionCallback& callback); |
| 22 |
| 23 ~GpuMemoryBufferImplDirectComposition() override; |
| 24 |
| 25 bool Map() override; |
| 26 void* memory(size_t plane) override; |
| 27 void Unmap() override; |
| 28 int stride(size_t plane) const override; |
| 29 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override; |
| 30 gfx::GpuMemoryBufferHandle GetHandle() const override; |
| 31 |
| 32 private: |
| 33 gfx::GpuMemoryBufferHandle handle_; |
| 34 }; |
| 35 |
| 36 } // namespace gpu |
| 37 |
| 38 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_DIRECT_COMPOSITION_H_ |
| OLD | NEW |