Chromium Code Reviews| 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 61800c80f482d69ba4e2a6f0f5f01c0963232908..c115952fa394f1fbc9724f300191cf47adc23823 100644 |
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.h |
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.h |
| @@ -41,6 +41,7 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { |
| // Overridden from gfx::GpuMemoryBuffer: |
| bool IsMapped() const override; |
| + size_t GetNumberOfPlanes() const override; |
| Format GetFormat() const override; |
| ClientBuffer AsClientBuffer() override; |
| @@ -57,11 +58,17 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { |
| const gfx::GpuMemoryBufferId id_; |
| const gfx::Size size_; |
| const Format format_; |
| + const size_t num_planes_; |
|
reveman
2015/03/21 03:03:55
This can be derived from the format. I don't think
emircan
2015/03/23 19:21:35
Acknowledged. I wanted to define this as const in
|
| const DestructionCallback callback_; |
| bool mapped_; |
| uint32 destruction_sync_point_; |
| private: |
| + |
| + // Returns the number of planes based on the format of the buffer. |
| + static size_t NumberOfPlanesForGpuMemoryBufferFormat( |
| + gfx::GpuMemoryBuffer::Format format); |
| + |
| DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl); |
| }; |