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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl.h

Issue 77023002: gpu: Add IOSurface backed GpuMemoryBuffer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix overflow check Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_memory_buffer_impl.h
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.h b/content/common/gpu/client/gpu_memory_buffer_impl.h
index 3858c3f8db5aaac9ed6d3734694be050628f158e..ee85f0f7b57ee02d73e5bca5e74ab26cf8cf77c6 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -11,28 +11,26 @@
namespace content {
-// Provides common implementation of a GPU memory buffer based
-// on a shared memory handle.
+// Provides common implementation of a GPU memory buffer.
class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
public:
- GpuMemoryBufferImpl(scoped_ptr<base::SharedMemory> shared_memory,
- size_t width,
- size_t height,
- unsigned internalformat);
+ static scoped_ptr<GpuMemoryBufferImpl> Create(
+ gfx::GpuMemoryBufferHandle handle,
+ gfx::Size size,
+ unsigned internalformat);
+
virtual ~GpuMemoryBufferImpl();
+ static bool IsFormatValid(unsigned internalformat);
+ static size_t BytesPerPixel(unsigned internalformat);
+
// Overridden from gfx::GpuMemoryBuffer:
- virtual void Map(AccessMode mode, void** vaddr) OVERRIDE;
- virtual void Unmap() OVERRIDE;
virtual bool IsMapped() const OVERRIDE;
virtual uint32 GetStride() const OVERRIDE;
- virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE;
- static bool IsFormatValid(unsigned internalformat);
- static size_t BytesPerPixel(unsigned internalformat);
+ protected:
+ GpuMemoryBufferImpl(gfx::Size size, unsigned internalformat);
- private:
- scoped_ptr<base::SharedMemory> shared_memory_;
const gfx::Size size_;
unsigned internalformat_;
bool mapped_;
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698