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 31b28bcfd2d6681b2f90ac87d173560504335041..1a7e043d60604c9b5ca3e24ab5e516247d5438e9 100644 |
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.h |
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.h |
| @@ -36,17 +36,27 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { |
| // Returns the number of planes based on the format of the buffer. |
| static size_t NumberOfPlanesForGpuMemoryBufferFormat(Format format); |
| - // Calculates the number of bytes that an implementation must use to store |
| - // one row of pixel data. |
| - static bool StrideInBytes(size_t width, |
| - Format format, |
| - int plane, |
| - size_t* stride_in_bytes); |
| - |
| // Returns the subsampling factor applied to the given zero-indexed |plane| of |
| // the |format| both horizontally and vertically. |
| static size_t SubsamplingFactor(Format format, int plane); |
| + // Returns the number of bytes used to store a row of the given zero-indexed |
| + // |plane| of |format|. |
| + // Note: This is an approximation and the exact size used by an implementation |
| + // might be different. |
| + static bool RowSizeInBytes(size_t width, |
| + Format format, |
| + int plane, |
| + size_t* size_in_bytes); |
| + |
| + // Returns the number of bytes used to store all the planes of a given |
| + // |format|. |
| + // Note: This is an approximation and the exact size used by an implementation |
| + // might be different. |
| + static bool BufferSizeInBytes(const gfx::Size& size, |
|
Daniele Castagna
2015/04/27 19:07:47
What about keeping GpuMemoryBufferImplSharedMemory
reveman
2015/04/27 19:30:30
I don't think we should have the base class depend
Daniele Castagna
2015/04/27 19:43:56
With this patch there might not be an explicit cod
reveman
2015/04/27 20:28:08
That's not the case. BufferSizeInBytes returns a m
|
| + Format format, |
| + size_t* size_in_bytes); |
| + |
| // Overridden from gfx::GpuMemoryBuffer: |
| bool IsMapped() const override; |
| Format GetFormat() const override; |