Chromium Code Reviews| 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 02a5048d27f1a530c65df9b3a315ac22afda21f3..55fc101a05be5abfc7a75727b34fc94c668f33e3 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 |
| @@ -120,6 +120,17 @@ bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(Format format) { |
| } |
| // static |
| +bool GpuMemoryBufferImplSharedMemory::IsUsageSupported(Usage usage) { |
| + switch (usage) { |
| + case MAP: |
| + case PERSISTENT_MAP: |
| + return true; |
| + case SCANOUT: |
| + return false; |
| + } |
| +} |
|
reveman
2015/05/20 14:26:08
NOTREACHED();
return false;
danakj
2015/05/20 17:51:14
Done.
|
| + |
| +// static |
| bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat( |
| const gfx::Size& size, |
| Format format) { |