| Index: content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| index a6ce59fdd627b57c58a0eee83af99206a8e8712c..b1fe9ae6e4cd176747948f5da404c6e27cec49a3 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| @@ -115,21 +115,9 @@ bool GpuMemoryBufferFactoryIOSurface::IsGpuMemoryBufferConfigurationSupported(
|
| return false;
|
| }
|
|
|
| -void GpuMemoryBufferFactoryIOSurface::GetSupportedGpuMemoryBufferConfigurations(
|
| - std::vector<Configuration>* configurations) {
|
| - configurations->assign(
|
| - kSupportedConfigurations,
|
| - kSupportedConfigurations + arraysize(kSupportedConfigurations));
|
| -}
|
| -
|
| -gfx::GpuMemoryBufferHandle
|
| -GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| - gfx::GpuMemoryBufferId id,
|
| - const gfx::Size& size,
|
| - gfx::BufferFormat format,
|
| - gfx::BufferUsage usage,
|
| - int client_id,
|
| - gfx::PluginWindowHandle surface_handle) {
|
| +// static
|
| +IOSurfaceRef GpuMemoryBufferFactoryIOSurface
|
| + : CreateIOSurface(const gfx::Size& size, gfx::BufferFormat format) {
|
| size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format);
|
| base::ScopedCFTypeRef<CFMutableArrayRef> planes(CFArrayCreateMutable(
|
| kCFAllocatorDefault, num_planes, &kCFTypeArrayCallBacks));
|
| @@ -158,7 +146,18 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| AddIntegerValue(properties, kIOSurfacePixelFormat, PixelFormat(format));
|
| CFDictionaryAddValue(properties, kIOSurfacePlaneInfo, planes);
|
|
|
| - base::ScopedCFTypeRef<IOSurfaceRef> io_surface(IOSurfaceCreate(properties));
|
| + return IOSurfaceCreate(properties);
|
| +}
|
| +
|
| +gfx::GpuMemoryBufferHandle
|
| +GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| + gfx::GpuMemoryBufferId id,
|
| + const gfx::Size& size,
|
| + gfx::BufferFormat format,
|
| + gfx::BufferUsage usage,
|
| + int client_id,
|
| + gfx::PluginWindowHandle surface_handle) {
|
| + base::ScopedCFTypeRef<IOSurfaceRef> io_surface(CreateIOSurface(size, format));
|
| if (!io_surface)
|
| return gfx::GpuMemoryBufferHandle();
|
|
|
|
|