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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_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: Address reveman@'s comments. 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/gpu_memory_buffer_factory_shared_memory.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
index b10fd00dfbc98f756bbb68ba087dd49dc8d1f0fa..5f76b0a83f038b0f90fa39530ec97fa872cb6faf 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
@@ -21,9 +21,9 @@ void GpuMemoryBufferFactorySharedMemory::
GetSupportedGpuMemoryBufferConfigurations(
std::vector<Configuration>* configurations) {
const Configuration supported_configurations[] = {
- { gfx::GpuMemoryBuffer::RGBA_8888, gfx::GpuMemoryBuffer::MAP },
- { gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::MAP }
- };
+ {gfx::GpuMemoryBuffer::R_8, gfx::GpuMemoryBuffer::MAP},
+ {gfx::GpuMemoryBuffer::RGBA_8888, gfx::GpuMemoryBuffer::MAP},
+ {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::MAP}};
configurations->assign(
supported_configurations,
supported_configurations + arraysize(supported_configurations));
@@ -40,8 +40,8 @@ GpuMemoryBufferFactorySharedMemory::CreateGpuMemoryBuffer(
base::SharedMemory shared_memory;
size_t stride_in_bytes = 0;
- if (!GpuMemoryBufferImpl::StrideInBytes(
- size.width(), format, &stride_in_bytes))
+ if (!GpuMemoryBufferImpl::StrideInBytes(size.width(), format,
reveman 2015/04/01 23:38:55 I had to stare at this for a few seconds to see th
Daniele Castagna 2015/04/03 01:08:15 Sure, this was done by 'git cl format'. It's a lit
reveman 2015/04/07 23:28:03 You should be able to run git cl format as it won'
+ &stride_in_bytes))
return gfx::GpuMemoryBufferHandle();
base::CheckedNumeric<size_t> size_in_bytes = stride_in_bytes;

Powered by Google App Engine
This is Rietveld 408576698