Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: gpu/command_buffer/service/image_factory.cc

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gpu_switches.cc ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8a1b8c4104b7581d92e216e01d02e89b9611c6ce 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;
@@ -50,6 +60,11 @@ bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
case GL_RGB:
switch (format) {
case gfx::GpuMemoryBuffer::RGBX_8888:
+ case gfx::GpuMemoryBuffer::ATC:
+ case gfx::GpuMemoryBuffer::ATCIA:
+ case gfx::GpuMemoryBuffer::DXT1:
+ case gfx::GpuMemoryBuffer::DXT5:
+ case gfx::GpuMemoryBuffer::ETC1:
return true;
case gfx::GpuMemoryBuffer::RGBA_8888:
case gfx::GpuMemoryBuffer::BGRA_8888:
@@ -63,6 +78,11 @@ bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
return false;
case gfx::GpuMemoryBuffer::RGBA_8888:
case gfx::GpuMemoryBuffer::BGRA_8888:
+ case gfx::GpuMemoryBuffer::ATC:
+ case gfx::GpuMemoryBuffer::ATCIA:
+ case gfx::GpuMemoryBuffer::DXT1:
+ case gfx::GpuMemoryBuffer::DXT5:
+ case gfx::GpuMemoryBuffer::ETC1:
return true;
}
NOTREACHED();
« no previous file with comments | « gpu/command_buffer/service/gpu_switches.cc ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698