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

Unified Diff: ui/gl/gl_image_linux_dma_buffer.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 | « ui/gfx/gpu_memory_buffer.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_linux_dma_buffer.cc
diff --git a/ui/gl/gl_image_linux_dma_buffer.cc b/ui/gl/gl_image_linux_dma_buffer.cc
index 1dec94209763c95020441fdb35d1989c48d41cb3..d3ee7b4c69780c38fd4bb95b087f0715aa117540 100644
--- a/ui/gl/gl_image_linux_dma_buffer.cc
+++ b/ui/gl/gl_image_linux_dma_buffer.cc
@@ -19,25 +19,19 @@ namespace {
bool ValidFormat(unsigned internalformat, gfx::GpuMemoryBuffer::Format format) {
switch (internalformat) {
case GL_RGB:
- switch (format) {
- case gfx::GpuMemoryBuffer::RGBX_8888:
- return true;
- case gfx::GpuMemoryBuffer::RGBA_8888:
- case gfx::GpuMemoryBuffer::BGRA_8888:
- return false;
- }
- NOTREACHED();
- return false;
+ return format == gfx::GpuMemoryBuffer::RGBX_8888;
case GL_RGBA:
- switch (format) {
- case gfx::GpuMemoryBuffer::BGRA_8888:
- return true;
- case gfx::GpuMemoryBuffer::RGBX_8888:
- case gfx::GpuMemoryBuffer::RGBA_8888:
- return false;
- }
- NOTREACHED();
- return false;
+ return format == gfx::GpuMemoryBuffer::BGRA_8888;
+ case GL_ATC_RGB_AMD:
+ return format == gfx::GpuMemoryBuffer::ATC;
+ case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
+ return format == gfx::GpuMemoryBuffer::ATCIA;
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+ return format == gfx::GpuMemoryBuffer::DXT1;
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ return format == gfx::GpuMemoryBuffer::DXT5;
+ case GL_ETC1_RGB8_OES:
+ return format == gfx::GpuMemoryBuffer::ETC1;
default:
return false;
}
@@ -50,6 +44,11 @@ EGLint FourCC(gfx::GpuMemoryBuffer::Format format) {
case gfx::GpuMemoryBuffer::RGBX_8888:
return DRM_FORMAT_XRGB8888;
case gfx::GpuMemoryBuffer::RGBA_8888:
+ case gfx::GpuMemoryBuffer::ATC:
+ case gfx::GpuMemoryBuffer::ATCIA:
+ case gfx::GpuMemoryBuffer::DXT1:
+ case gfx::GpuMemoryBuffer::DXT5:
+ case gfx::GpuMemoryBuffer::ETC1:
NOTREACHED();
return 0;
}
« no previous file with comments | « ui/gfx/gpu_memory_buffer.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698