Chromium Code Reviews| Index: content/common/gpu/gpu_memory_buffer_factory_io_surface.cc |
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc |
| index 23412e59ac9d451ef6decd648093471f87816b13..585beb3e67b228c96af167acc72b5695ce416adf 100644 |
| --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc |
| +++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc |
| @@ -32,6 +32,10 @@ int32 BytesPerElement(gfx::BufferFormat format, int plane) { |
| case gfx::BufferFormat::BGRA_8888: |
| DCHECK_EQ(plane, 0); |
| return 4; |
| + case gfx::BufferFormat::YUV_420_BIPLANAR: |
| + static int32 bytes_per_element[] = {1, 2}; |
| + DCHECK_LT(static_cast<size_t>(plane), arraysize(bytes_per_element)); |
| + return bytes_per_element[plane]; |
| case gfx::BufferFormat::UYVY_422: |
| DCHECK_EQ(plane, 0); |
| return 2; |
| @@ -58,6 +62,8 @@ int32 PixelFormat(gfx::BufferFormat format) { |
| return 'L008'; |
| case gfx::BufferFormat::BGRA_8888: |
| return 'BGRA'; |
| + case gfx::BufferFormat::YUV_420_BIPLANAR: |
| + return '420v'; |
| case gfx::BufferFormat::UYVY_422: |
| return '2vuy'; |
| case gfx::BufferFormat::ATC: |
| @@ -85,6 +91,8 @@ const GpuMemoryBufferFactory::Configuration kSupportedConfigurations[] = { |
| {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::MAP}, |
| {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::MAP}, |
| {gfx::BufferFormat::UYVY_422, gfx::BufferUsage::PERSISTENT_MAP}, |
| + {gfx::BufferFormat::YUV_420_BIPLANAR, gfx::BufferUsage::MAP}, |
| + {gfx::BufferFormat::YUV_420_BIPLANAR, gfx::BufferUsage::PERSISTENT_MAP}, |
|
Daniele Castagna
2015/08/25 15:08:42
No scanout?
Andre
2015/08/25 18:19:57
reveman suggested adding that with a separate patc
|
| }; |
| } // namespace |