| Index: content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.cc b/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| index 4b05bbff2aa1c4ce67da55713b3d020a4a9d8f0a..d3c08bdb1a09b0d1256c297148cd190d2fae5690 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| @@ -5,7 +5,6 @@
|
| #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
|
|
|
| #include "base/logging.h"
|
| -#include "base/numerics/safe_math.h"
|
| #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
|
| #include "ui/gl/gl_bindings.h"
|
|
|
| @@ -77,24 +76,16 @@
|
| }
|
|
|
| // static
|
| -bool GpuMemoryBufferImpl::StrideInBytes(size_t width,
|
| - Format format,
|
| - size_t* stride_in_bytes) {
|
| - base::CheckedNumeric<size_t> s = width;
|
| +size_t GpuMemoryBufferImpl::BytesPerPixel(Format format) {
|
| switch (format) {
|
| case RGBA_8888:
|
| case RGBX_8888:
|
| case BGRA_8888:
|
| - s *= 4;
|
| - if (!s.IsValid())
|
| - return false;
|
| -
|
| - *stride_in_bytes = s.ValueOrDie();
|
| - return true;
|
| + return 4;
|
| }
|
|
|
| NOTREACHED();
|
| - return false;
|
| + return 0;
|
| }
|
|
|
| gfx::GpuMemoryBuffer::Format GpuMemoryBufferImpl::GetFormat() const {
|
|
|