Index: gpu/command_buffer/service/image_factory.cc |
diff --git a/gpu/command_buffer/service/image_factory.cc b/gpu/command_buffer/service/image_factory.cc |
index 0b740d8f32b47eb1e179be288abcb61ae2714b00..1665c1eea85ce316866569cbfe3d6adf5bec27b1 100644 |
--- a/gpu/command_buffer/service/image_factory.cc |
+++ b/gpu/command_buffer/service/image_factory.cc |
@@ -22,6 +22,16 @@ gfx::GpuMemoryBuffer::Format ImageFactory::ImageFormatToGpuMemoryBufferFormat( |
return gfx::GpuMemoryBuffer::RGBX_8888; |
case GL_RGBA: |
return gfx::GpuMemoryBuffer::RGBA_8888; |
+ case GL_ATC_RGB_AMD: |
+ return gfx::GpuMemoryBuffer::ATC; |
+ case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD: |
+ return gfx::GpuMemoryBuffer::ATCIA; |
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: |
+ return gfx::GpuMemoryBuffer::DXT1; |
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: |
+ return gfx::GpuMemoryBuffer::DXT5; |
+ case GL_ETC1_RGB8_OES: |
+ return gfx::GpuMemoryBuffer::ETC1; |
default: |
NOTREACHED(); |
return gfx::GpuMemoryBuffer::RGBA_8888; |
@@ -49,6 +59,11 @@ bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat( |
switch (internalformat) { |
case GL_RGB: |
switch (format) { |
+ case gfx::GpuMemoryBuffer::ATC: |
+ case gfx::GpuMemoryBuffer::ATCIA: |
+ case gfx::GpuMemoryBuffer::DXT1: |
+ case gfx::GpuMemoryBuffer::DXT5: |
+ case gfx::GpuMemoryBuffer::ETC1: |
case gfx::GpuMemoryBuffer::RGBX_8888: |
return true; |
case gfx::GpuMemoryBuffer::RGBA_8888: |
@@ -61,6 +76,11 @@ bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat( |
switch (format) { |
case gfx::GpuMemoryBuffer::RGBX_8888: |
return false; |
+ case gfx::GpuMemoryBuffer::ATC: |
+ case gfx::GpuMemoryBuffer::ATCIA: |
+ case gfx::GpuMemoryBuffer::DXT1: |
+ case gfx::GpuMemoryBuffer::DXT5: |
+ case gfx::GpuMemoryBuffer::ETC1: |
case gfx::GpuMemoryBuffer::RGBA_8888: |
case gfx::GpuMemoryBuffer::BGRA_8888: |
return true; |