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

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

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no ozone Created 6 years, 7 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHM_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHM_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHM_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHM_H_
7 7
8 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" 8 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // Provides implementation of a GPU memory buffer based 12 // Provides implementation of a GPU memory buffer based
13 // on a shared memory handle. 13 // on a shared memory handle.
14 class GpuMemoryBufferImplShm : public GpuMemoryBufferImpl { 14 class GpuMemoryBufferImplShm : public GpuMemoryBufferImpl {
15 public: 15 public:
16 GpuMemoryBufferImplShm(gfx::Size size, unsigned internalformat); 16 GpuMemoryBufferImplShm(gfx::Size size, unsigned internalformat);
17 virtual ~GpuMemoryBufferImplShm(); 17 virtual ~GpuMemoryBufferImplShm();
18 18
19 bool Initialize(gfx::GpuMemoryBufferHandle handle); 19 bool Initialize(gfx::GpuMemoryBufferHandle handle);
20 bool InitializeFromSharedMemory(scoped_ptr<base::SharedMemory> shared_memory); 20 bool InitializeFromSharedMemory(scoped_ptr<base::SharedMemory> shared_memory);
21 21
22 // Overridden from gfx::GpuMemoryBuffer: 22 // Overridden from gfx::GpuMemoryBuffer:
23 virtual void* Map(AccessMode mode) OVERRIDE; 23 virtual void* Map() OVERRIDE;
24 virtual void Unmap() OVERRIDE; 24 virtual void Unmap() OVERRIDE;
25 virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; 25 virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE;
26 26
27 private: 27 private:
28 scoped_ptr<base::SharedMemory> shared_memory_; 28 scoped_ptr<base::SharedMemory> shared_memory_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplShm); 30 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplShm);
31 }; 31 };
32 32
33 } // namespace content 33 } // namespace content
34 34
35 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHM_H_ 35 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698