| Index: content/common/gpu/gpu_memory_buffer_factory.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory.cc b/content/common/gpu/gpu_memory_buffer_factory.cc
|
| index 019bdd8dbcc629c80ad7ae24fe43d15526feaf77..7794ea64985e31fb3cd454e82276881d73f2f153 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory.cc
|
| @@ -23,20 +23,37 @@ namespace content {
|
|
|
| // static
|
| void GpuMemoryBufferFactory::GetSupportedTypes(
|
| + gfx::GpuMemoryBuffer::Usage usage,
|
| std::vector<gfx::GpuMemoryBufferType>* types) {
|
| - const gfx::GpuMemoryBufferType supported_types[] = {
|
| + switch (usage) {
|
| + case gfx::GpuMemoryBuffer::PERSISTENT_MAP: {
|
| + // TODO(reveman): PERSISTENT_MAP is only supported by shared memory
|
| + // buffers. crbug.com/489438
|
| + const gfx::GpuMemoryBufferType supported_types[] = {
|
| + gfx::SHARED_MEMORY_BUFFER};
|
| + types->assign(supported_types,
|
| + supported_types + arraysize(supported_types));
|
| + break;
|
| + }
|
| + case gfx::GpuMemoryBuffer::MAP:
|
| + case gfx::GpuMemoryBuffer::SCANOUT: {
|
| + const gfx::GpuMemoryBufferType supported_types[] = {
|
| #if defined(OS_MACOSX)
|
| - gfx::IO_SURFACE_BUFFER,
|
| + gfx::IO_SURFACE_BUFFER,
|
| #endif
|
| #if defined(OS_ANDROID)
|
| - gfx::SURFACE_TEXTURE_BUFFER,
|
| + gfx::SURFACE_TEXTURE_BUFFER,
|
| #endif
|
| #if defined(USE_OZONE)
|
| - gfx::OZONE_NATIVE_BUFFER,
|
| + gfx::OZONE_NATIVE_BUFFER,
|
| #endif
|
| - gfx::SHARED_MEMORY_BUFFER
|
| - };
|
| - types->assign(supported_types, supported_types + arraysize(supported_types));
|
| + gfx::SHARED_MEMORY_BUFFER
|
| + };
|
| + types->assign(supported_types,
|
| + supported_types + arraysize(supported_types));
|
| + break;
|
| + }
|
| + }
|
| }
|
|
|
| // static
|
|
|