Chromium Code Reviews| Index: content/common/gpu/image_transport_surface_iosurface_mac.cc |
| diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.cc b/content/common/gpu/image_transport_surface_iosurface_mac.cc |
| index 42e8300d333e9b6668e42fde254cfcdcc310b3ff..9c01d4fb2071b4cf2ea538970866cb6cc109abb5 100644 |
| --- a/content/common/gpu/image_transport_surface_iosurface_mac.cc |
| +++ b/content/common/gpu/image_transport_surface_iosurface_mac.cc |
| @@ -12,7 +12,7 @@ namespace { |
| // IOSurface dimensions will be rounded up to a multiple of this value in order |
| // to reduce memory thrashing during resize. This must be a power of 2. |
| -const uint32 kIOSurfaceDimensionRoundup = 64; |
| +const uint32 kIOSurfaceDimensionRoundup = 1; |
|
ccameron
2015/10/22 06:09:28
This is needed so that the IOSurface will always b
|
| int RoundUpSurfaceDimension(int number) { |
| DCHECK(number >= 0); |
| @@ -59,11 +59,13 @@ bool IOSurfaceStorageProvider::AllocateColorBufferStorage( |
| GLuint texture, gfx::Size pixel_size, float scale_factor) { |
| // Allocate a new IOSurface, which is the GPU resource that can be |
| // shared across processes. |
| + int pixel_format = 'BGRA'; |
| base::ScopedCFTypeRef<CFMutableDictionaryRef> properties; |
| properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault, |
| 0, |
| &kCFTypeDictionaryKeyCallBacks, |
| &kCFTypeDictionaryValueCallBacks)); |
| + AddIntegerValue(properties, kIOSurfacePixelFormat, pixel_format); |
|
ccameron
2015/10/22 06:09:28
This property is needed for -[CALayer setContents:
|
| AddIntegerValue(properties, |
| kIOSurfaceWidth, |
| pixel_size.width()); |