Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_dma_buf.h

Issue 288343004: working copy of "zero_copy" Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 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 CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_DMA_BUF_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_DMA_BUF_H_
7
8 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
9 struct gbm_bo;
10 namespace content {
11 class GBMWrapper;
12 // Provides implementation of a GPU memory buffer based
13 // on an Dma_buf handle.
14 class GpuMemoryBufferImplDMABuf : public GpuMemoryBufferImpl {
15 public:
16 GpuMemoryBufferImplDMABuf(gfx::Size size, unsigned internalformat);
17 virtual ~GpuMemoryBufferImplDMABuf();
18
19 static bool IsFormatSupported(unsigned internalformat);
20
21 bool Initialize(gfx::GpuMemoryBufferHandle handle);
22
23 // Overridden from gfx::GpuMemoryBuffer:
24 virtual void* Map() OVERRIDE;
25 virtual void Unmap() OVERRIDE;
26 virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE;
27 virtual uint32 GetStride() const OVERRIDE;
28
29 private:
30 int dma_buf_id_;
31 void* mapped_addr_;
32 uint32_t stride_;
33 struct gbm_bo* tex_bo_;
34 static GBMWrapper* wrapper_;
35 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplDMABuf);
36 };
37
38 } // namespace content
39
40 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_DMA_BUF_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl_dma_buf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698