| 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 81af39991d6c6f2698b4154d3d511c077ab2b23f..8daabd07546ac28d9071a60f6572012226930813 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| @@ -98,6 +98,11 @@ size_t GpuMemoryBufferImpl::SubsamplingFactor(gfx::BufferFormat format,
|
| DCHECK_LT(static_cast<size_t>(plane), arraysize(factor));
|
| return factor[plane];
|
| }
|
| + case gfx::BufferFormat::YUV_420_BIPLANAR: {
|
| + static size_t factor[] = {1, 2};
|
| + DCHECK_LT(static_cast<size_t>(plane), arraysize(factor));
|
| + return factor[plane];
|
| + }
|
| }
|
| NOTREACHED();
|
| return 0;
|
| @@ -145,6 +150,10 @@ bool GpuMemoryBufferImpl::RowSizeInBytes(size_t width,
|
| DCHECK_EQ(width % 2, 0u);
|
| *size_in_bytes = width / SubsamplingFactor(format, plane);
|
| return true;
|
| + case gfx::BufferFormat::YUV_420_BIPLANAR:
|
| + DCHECK_EQ(width % 2, 0u);
|
| + *size_in_bytes = width;
|
| + return true;
|
| }
|
| NOTREACHED();
|
| return false;
|
|
|