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 dc792246e1fac1d29d2f02271b5dc03735b37d90..cd462e174437b0c356570a0e40ea119063d700b6 100644 |
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h |
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h |
@@ -33,9 +33,15 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { |
// Type-checking upcast routine. Returns an NULL on failure. |
static GpuMemoryBufferImpl* FromClientBuffer(ClientBuffer buffer); |
- // Returns the number of bytes per pixel that must be used by an |
+ // Returns the number of bits per pixel that must be used by an |
// implementation when using |format|. |
- static size_t BytesPerPixel(Format format); |
+ static size_t BitsPerPixel(Format format); |
+ |
+ // Returns the number of bytes that an implementation must use to store |
+ // |pixel_count| number of pixels. |
+ static size_t PixelsToBytes( |
+ size_t pixel_count, |
+ gfx::GpuMemoryBuffer::Format format); |
reveman
2014/12/15 17:33:34
Hm, this doesn't work with stride != width * bytes
christiank
2014/12/16 12:02:52
You're right. This code is based on the assumption
reveman
2014/12/16 16:40:12
Thanks for explaining.
Not supporting some dimens
christiank
2014/12/18 13:58:29
Sounds good to me. I have now replaced PixelsToByt
|
// Overridden from gfx::GpuMemoryBuffer: |
bool IsMapped() const override; |