| Index: ui/gl/gl_image_memory.cc
|
| diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
|
| index 5e23d30778dd08389438753a5f3b6c33098ef77f..0a67e000665b6a5806a0f935f61e02faaf540a15 100644
|
| --- a/ui/gl/gl_image_memory.cc
|
| +++ b/ui/gl/gl_image_memory.cc
|
| @@ -100,26 +100,18 @@
|
| }
|
|
|
| // static
|
| -bool GLImageMemory::StrideInBytes(size_t width,
|
| - gfx::GpuMemoryBuffer::Format format,
|
| - size_t* stride_in_bytes) {
|
| - base::CheckedNumeric<size_t> s = width;
|
| - switch (format) {
|
| - case gfx::GpuMemoryBuffer::RGBA_8888:
|
| - case gfx::GpuMemoryBuffer::BGRA_8888:
|
| - s *= 4;
|
| - if (!s.IsValid())
|
| - return false;
|
| -
|
| - *stride_in_bytes = s.ValueOrDie();
|
| - return true;
|
| +size_t GLImageMemory::BytesPerPixel(gfx::GpuMemoryBuffer::Format format) {
|
| + switch (format) {
|
| + case gfx::GpuMemoryBuffer::RGBA_8888:
|
| + case gfx::GpuMemoryBuffer::BGRA_8888:
|
| + return 4;
|
| case gfx::GpuMemoryBuffer::RGBX_8888:
|
| NOTREACHED();
|
| - return false;
|
| - }
|
| -
|
| - NOTREACHED();
|
| - return false;
|
| + return 0;
|
| + }
|
| +
|
| + NOTREACHED();
|
| + return 0;
|
| }
|
|
|
| bool GLImageMemory::Initialize(const unsigned char* memory,
|
|
|