Chromium Code Reviews| Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone.h |
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.h |
| similarity index 62% |
| copy from content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h |
| copy to content/common/gpu/client/gpu_memory_buffer_impl_ozone.h |
| index a7868c15ea39a36ee55f5f071ae9ff88d811e465..fecbf6bf1d5b6560564d79c20789c3a60e260447 100644 |
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h |
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.h |
| @@ -1,20 +1,21 @@ |
| -// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
|
reveman
2014/08/11 19:43:06
2014
|
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
| -#define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
| +#ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_H_ |
| +#define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_H_ |
| #include "content/common/gpu/client/gpu_memory_buffer_impl.h" |
| namespace content { |
| // Implementation of GPU memory buffer based on shared memory. |
|
reveman
2014/08/11 19:43:06
comment is incorrect.
achaulk
2014/08/12 19:03:57
Done.
|
| -class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
| +class GpuMemoryBufferImplOzone : public GpuMemoryBufferImpl { |
|
reveman
2014/08/11 19:43:06
I don't think this is the correct name for this cl
achaulk
2014/08/12 19:03:57
Done.
|
| public: |
| - GpuMemoryBufferImplSharedMemory(const gfx::Size& size, |
| - unsigned internalformat); |
| - virtual ~GpuMemoryBufferImplSharedMemory(); |
| + GpuMemoryBufferImplOzone(const gfx::Size& size, |
| + unsigned internalformat, |
| + int32 client_id); |
|
reveman
2014/08/11 19:43:06
client_id? I think you should init this from Initi
achaulk
2014/08/12 19:03:57
Done.
|
| + virtual ~GpuMemoryBufferImplOzone(); |
| // Allocates a shared memory backed GPU memory buffer with |size| and |
| // |internalformat| for use by |child_process|. |
| @@ -22,6 +23,8 @@ class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
| const gfx::Size& size, |
| unsigned internalformat, |
| base::ProcessHandle child_process, |
| + int client_id, |
| + GpuMemoryBufferFactoryHost* gpu_factory_host, |
| const AllocationCallback& callback); |
| static bool IsLayoutSupported(const gfx::Size& size, unsigned internalformat); |
| @@ -40,11 +43,14 @@ class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl { |
| virtual gfx::GpuMemoryBufferHandle GetHandle() const OVERRIDE; |
| private: |
| - scoped_ptr<base::SharedMemory> shared_memory_; |
| + DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzone); |
| - DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSharedMemory); |
| + static uint32_t GetNextBufferId(); |
|
reveman
2014/08/11 19:43:06
can you move this and next_buffer_id_ to anonymous
achaulk
2014/08/12 19:03:57
Done.
|
| + |
| + gfx::GpuMemoryBufferHandle handle_; |
|
reveman
2014/08/11 19:43:06
I think gfx::GpuMemoryBufferId is more appropriate
achaulk
2014/08/12 19:03:57
Done.
|
| + static uint32_t next_buffer_id_; |
| }; |
| } // namespace content |
| -#endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_ |
| +#endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_H_ |