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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc

Issue 1051503003: Add R_8 GPU memory buffers format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix validation problem in StrideInBytes. Deals with GL_RED/GL_LUMINANCE. Created 5 years, 9 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
Index: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
index 3d3aee965a3d5aaa526538d9b1aff7d6923e1d24..fdf33197cf036a33d6c20a26f8757f8de2816bff 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
@@ -122,6 +122,7 @@ bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(Format format) {
case DXT1:
case DXT5:
case ETC1:
+ case R_8:
case RGBA_8888:
case BGRA_8888:
return true;
@@ -146,6 +147,7 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
// Compressed images must have a width and height that's evenly divisible
// by the block size.
return size.width() % 4 == 0 && size.height() % 4 == 0;
+ case R_8:
case RGBA_8888:
case BGRA_8888:
case RGBX_8888:

Powered by Google App Engine
This is Rietveld 408576698