summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/tests/gl_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/tests/gl_manager.cc')
-rw-r--r--gpu/command_buffer/tests/gl_manager.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 3a3d7e9..2b6d06d 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -46,6 +46,7 @@ size_t NumberOfPlanesForGpuMemoryBufferFormat(
case gfx::GpuMemoryBuffer::Format::DXT1:
case gfx::GpuMemoryBuffer::Format::DXT5:
case gfx::GpuMemoryBuffer::Format::ETC1:
+ case gfx::GpuMemoryBuffer::Format::R_8:
case gfx::GpuMemoryBuffer::Format::RGBA_8888:
case gfx::GpuMemoryBuffer::Format::RGBX_8888:
case gfx::GpuMemoryBuffer::Format::BGRA_8888:
@@ -64,6 +65,7 @@ size_t SubsamplingFactor(gfx::GpuMemoryBuffer::Format format, int plane) {
case gfx::GpuMemoryBuffer::DXT1:
case gfx::GpuMemoryBuffer::DXT5:
case gfx::GpuMemoryBuffer::ETC1:
+ case gfx::GpuMemoryBuffer::R_8:
case gfx::GpuMemoryBuffer::RGBA_8888:
case gfx::GpuMemoryBuffer::RGBX_8888:
case gfx::GpuMemoryBuffer::BGRA_8888:
@@ -92,6 +94,8 @@ size_t StrideInBytes(size_t width,
DCHECK_EQ(plane, 0);
DCHECK_EQ(width % 2, 0U);
return width / 2;
+ case gfx::GpuMemoryBuffer::R_8:
+ return (width + 3) & ~0x3;
case gfx::GpuMemoryBuffer::RGBA_8888:
case gfx::GpuMemoryBuffer::BGRA_8888:
DCHECK_EQ(plane, 0);