| 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 ba00ea2553a2600002baee58b12b5ee9cdb9a4c0..d8bb4e7033c98de9f59ee04accf0dee2db77cffd 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
|
| @@ -94,6 +94,8 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| gfx::GpuMemoryBuffer::Usage usage,
|
| int client_id,
|
| gfx::PluginWindowHandle surface_handle) {
|
| + size_t bits_per_pixel = GpuMemoryBufferImpl::BitsPerPixel(format);
|
| + DCHECK_EQ(bits_per_pixel % 8, 0u);
|
| base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
|
| properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
|
| 0,
|
| @@ -101,7 +103,7 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
|
| &kCFTypeDictionaryValueCallBacks));
|
| AddIntegerValue(properties, kIOSurfaceWidth, size.width());
|
| AddIntegerValue(properties, kIOSurfaceHeight, size.height());
|
| - AddIntegerValue(properties, kIOSurfaceBytesPerElement, BytesPerPixel(format));
|
| + AddIntegerValue(properties, kIOSurfaceBytesPerElement, bits_per_pixel / 8);
|
| AddIntegerValue(properties, kIOSurfacePixelFormat, PixelFormat(format));
|
| // TODO(reveman): Remove this when using a mach_port_t to transfer
|
| // IOSurface to browser and renderer process. crbug.com/323304
|
|
|