| 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 0c0426f6794c394c3c05ad6abebdf1ace85f611b..208261dd0831e940f8f858b63a4169888c706db8 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc
|
| @@ -111,6 +111,25 @@ bool GpuMemoryBufferImpl::StrideInBytes(size_t width,
|
| return false;
|
| }
|
|
|
| +// static
|
| +size_t GpuMemoryBufferImpl::NumberOfPlanesForGpuMemoryBufferFormat(
|
| + gfx::GpuMemoryBuffer::Format format) {
|
| + switch (format) {
|
| + case gfx::GpuMemoryBuffer::Format::ATC:
|
| + case gfx::GpuMemoryBuffer::Format::ATCIA:
|
| + case gfx::GpuMemoryBuffer::Format::DXT1:
|
| + case gfx::GpuMemoryBuffer::Format::DXT5:
|
| + case gfx::GpuMemoryBuffer::Format::ETC1:
|
| + case gfx::GpuMemoryBuffer::Format::RGBA_8888:
|
| + case gfx::GpuMemoryBuffer::Format::RGBX_8888:
|
| + case gfx::GpuMemoryBuffer::Format::BGRA_8888:
|
| + return 1;
|
| + default:
|
| + NOTREACHED();
|
| + return 0;
|
| + }
|
| +}
|
| +
|
| gfx::GpuMemoryBuffer::Format GpuMemoryBufferImpl::GetFormat() const {
|
| return format_;
|
| }
|
|
|