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

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 1051503003: Add R_8 GPU memory buffers format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged on master. Created 5 years, 8 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/tests/gl_gpu_memory_buffer_unittest.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 3a3d7e9efdca6a097c5c8330fceae42b7a8392ce..2b6d06dbc22634d829354867406d26dca2de0dcd 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -46,6 +46,7 @@ size_t NumberOfPlanesForGpuMemoryBufferFormat(
case gfx::GpuMemoryBuffer::Format::DXT1:
case gfx::GpuMemoryBuffer::Format::DXT5:
case gfx::GpuMemoryBuffer::Format::ETC1:
+ case gfx::GpuMemoryBuffer::Format::R_8:
case gfx::GpuMemoryBuffer::Format::RGBA_8888:
case gfx::GpuMemoryBuffer::Format::RGBX_8888:
case gfx::GpuMemoryBuffer::Format::BGRA_8888:
@@ -64,6 +65,7 @@ size_t SubsamplingFactor(gfx::GpuMemoryBuffer::Format format, int plane) {
case gfx::GpuMemoryBuffer::DXT1:
case gfx::GpuMemoryBuffer::DXT5:
case gfx::GpuMemoryBuffer::ETC1:
+ case gfx::GpuMemoryBuffer::R_8:
case gfx::GpuMemoryBuffer::RGBA_8888:
case gfx::GpuMemoryBuffer::RGBX_8888:
case gfx::GpuMemoryBuffer::BGRA_8888:
@@ -92,6 +94,8 @@ size_t StrideInBytes(size_t width,
DCHECK_EQ(plane, 0);
DCHECK_EQ(width % 2, 0U);
return width / 2;
+ case gfx::GpuMemoryBuffer::R_8:
+ return (width + 3) & ~0x3;
case gfx::GpuMemoryBuffer::RGBA_8888:
case gfx::GpuMemoryBuffer::BGRA_8888:
DCHECK_EQ(plane, 0);
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698