diff options
Diffstat (limited to 'gpu/command_buffer/service/image_factory.cc')
-rw-r--r-- | gpu/command_buffer/service/image_factory.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/image_factory.cc b/gpu/command_buffer/service/image_factory.cc index f09cfb8..74994ff 100644 --- a/gpu/command_buffer/service/image_factory.cc +++ b/gpu/command_buffer/service/image_factory.cc @@ -19,6 +19,8 @@ ImageFactory::~ImageFactory() { gfx::GpuMemoryBuffer::Format ImageFactory::ImageFormatToGpuMemoryBufferFormat( unsigned internalformat) { switch (internalformat) { + case GL_R8: + return gfx::GpuMemoryBuffer::R_8; case GL_RGB: return gfx::GpuMemoryBuffer::RGBX_8888; case GL_RGBA: @@ -78,6 +80,8 @@ bool ImageFactory::IsGpuMemoryBufferFormatSupported( return capabilities.texture_format_dxt5; case gfx::GpuMemoryBuffer::ETC1: return capabilities.texture_format_etc1; + case gfx::GpuMemoryBuffer::R_8: + return capabilities.texture_rg; case gfx::GpuMemoryBuffer::RGBA_8888: case gfx::GpuMemoryBuffer::RGBX_8888: case gfx::GpuMemoryBuffer::YUV_420: @@ -101,6 +105,7 @@ bool ImageFactory::IsImageSizeValidForGpuMemoryBufferFormat( // Compressed images must have a width and height that's evenly divisible // by the block size. return size.width() % 4 == 0 && size.height() % 4 == 0; + case gfx::GpuMemoryBuffer::R_8: case gfx::GpuMemoryBuffer::RGBA_8888: case gfx::GpuMemoryBuffer::BGRA_8888: case gfx::GpuMemoryBuffer::RGBX_8888: |