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

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

Issue 916083002: Add support for compressed GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ozone Created 5 years, 10 months 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/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('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..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;
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698