Instead of ShareableBitmap.
Created attachment 215696 [details] patch
Attachment 215696 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Configurations/WebKit2.xcconfig', u'Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm', u'Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm', u'Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp', u'Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.h', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm']" exit_code: 1 Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.h:43: The parameter name "layer" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.h:43: The parameter name "size" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 215697 [details] patch
Comment on attachment 215697 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=215697&action=review Looks like there’s a memory leak somewhere, so I’m going to r-. > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:182 > + const void* keys[6]; > + const void* values[6]; > + keys[0] = kIOSurfaceWidth; > + values[0] = CFNumberCreate(0, kCFNumberIntType, &width); > + keys[1] = kIOSurfaceHeight; > + values[1] = CFNumberCreate(0, kCFNumberIntType, &height); > + keys[2] = kIOSurfacePixelFormat; > + values[2] = CFNumberCreate(0, kCFNumberIntType, &pixelFormat); > + keys[3] = kIOSurfaceBytesPerElement; > + values[3] = CFNumberCreate(0, kCFNumberIntType, &bytesPerElement); > + keys[4] = kIOSurfaceBytesPerRow; > + values[4] = CFNumberCreate(0, kCFNumberLongType, &bytesPerRow); > + keys[5] = kIOSurfaceAllocSize; > + values[5] = CFNumberCreate(0, kCFNumberLongType, &allocSize); > + > + RetainPtr<CFDictionaryRef> dict = adoptCF(CFDictionaryCreate(0, keys, values, 6, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); > + for (unsigned i = 0; i < 6; i++) > + CFRelease(values[i]); This should use the Objective-C literal syntax. > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:207 > + m_frontBuffer = 0; > + m_frontSurface = 0; These should be nullptr. > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:321 > + frontImage = 0; > + frontContext = 0; Should be nullptr.
Comment on attachment 215697 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=215697&action=review > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:106 > + result.m_frontSurface = IOSurfaceLookupFromMachPort(machPort.port()); I think the leak is here!
Created attachment 215707 [details] patch
Comment on attachment 215707 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=215707&action=review > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:171 > + (id)kIOSurfaceAllocSize: @(allocSize) }; } should be on a separate line.
http://trac.webkit.org/changeset/158417
Created attachment 215749 [details] address darin's review comments
Comment on attachment 215749 [details] address darin's review comments View in context: https://bugs.webkit.org/attachment.cgi?id=215749&action=review > Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerBackingStore.mm:142 > RetainPtr<CGContextRef> ctx = adoptCF(CGIOSurfaceContextCreate(surface, size.width(), size.height(), bitsPerComponent, bitsPerPixel, colorSpace, bitmapInfo)); Can’ probably jest return adoptCF directly here.
follow up in http://trac.webkit.org/changeset/158449