RESOLVED FIXED 123600
Remote Layer Tree: Vend layer contents via IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=123600
Summary Remote Layer Tree: Vend layer contents via IOSurfaces
Tim Horton
Reported 2013-10-31 17:21:29 PDT
Instead of ShareableBitmap.
Attachments
patch (26.61 KB, patch)
2013-10-31 17:23 PDT, Tim Horton
no flags
patch (26.60 KB, patch)
2013-10-31 17:27 PDT, Tim Horton
andersca: review-
patch (26.10 KB, patch)
2013-10-31 18:06 PDT, Tim Horton
andersca: review+
address darin's review comments (4.10 KB, patch)
2013-11-01 12:39 PDT, Tim Horton
andersca: review+
Tim Horton
Comment 1 2013-10-31 17:23:32 PDT
WebKit Commit Bot
Comment 2 2013-10-31 17:25:53 PDT
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.
Tim Horton
Comment 3 2013-10-31 17:27:09 PDT
Anders Carlsson
Comment 4 2013-10-31 17:46:09 PDT
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.
Anders Carlsson
Comment 5 2013-10-31 17:48:20 PDT
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!
Tim Horton
Comment 6 2013-10-31 18:06:11 PDT
Anders Carlsson
Comment 7 2013-10-31 18:10:29 PDT
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.
Tim Horton
Comment 8 2013-10-31 18:15:02 PDT
Tim Horton
Comment 9 2013-11-01 12:39:56 PDT
Created attachment 215749 [details] address darin's review comments
Anders Carlsson
Comment 10 2013-11-01 12:41:07 PDT
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.
Tim Horton
Comment 11 2013-11-01 12:45:26 PDT
Note You need to log in before you can comment on or make changes to this bug.