Chromium Code Reviews| 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 cc0ac0044ac2997e2a9d6782d171e202a8ea4ad0..a294323f666a6707a7db9ec268aaa7fc18bcbd0a 100644 |
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.cc |
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc |
| @@ -97,6 +97,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; |
| @@ -144,6 +149,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; |
|
reveman
2015/08/10 20:28:16
hm, is this really what we want here? seems like B
Andre
2015/08/10 21:09:48
Hmm, I'm not seeing why it's wrong.
Let's say size
reveman
2015/08/10 22:40:54
Yes, that looks correct. Sorry my bad. Still think
|
| + return true; |
| } |
| NOTREACHED(); |
| return false; |