Bug 122773

Summary: Add a PlatformCALayer subclass that proxies its property changes across the process boundary
Product: WebKit Reporter: Tim Horton <thorton>
Component: Layout and RenderingAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, eflews.bot, gyuyoung.kim, kondapallykalyan, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch andersca: review+, eflews.bot: commit-queue-

Description Tim Horton 2013-10-14 12:39:40 PDT
Instead of having PlatformLayers in the Web process, have a PlatformCALayer subclass (PlatformCALayerRemote?) that keeps track of property changes and funnels them over to the UI process, where we will have PlatformLayers.
Comment 1 Tim Horton 2013-10-15 15:53:59 PDT
Created attachment 214313 [details]
patch
Comment 2 WebKit Commit Bot 2013-10-15 15:56:24 PDT
Attachment 214313 [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/WebCore/platform/graphics/GraphicsLayer.h', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h', u'Source/WebCore/platform/graphics/ca/PlatformCALayer.h', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebCoreArgumentCoders.cpp', u'Source/WebKit2/Shared/WebCoreArgumentCoders.h', u'Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h', u'Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h', u'Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm', u'Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h', u'Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm', u'Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm', u'Source/WebKit2/WebKit2.xcodeproj/project.pbxproj', u'Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp', u'Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h', u'Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp', u'Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.h', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.mm', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h', u'Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm']" exit_code: 1
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h:148:  The parameter name "context" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/UIProcess/WebPageProxy.h:394:  The parameter name "rootLayer" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:30:  You should add a blank line after implementation file's own header.  [build/include_order] [4]
Total errors found: 3 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2013-10-15 16:08:33 PDT
Simon wants a typedef for the layer ID
Comment 4 EFL EWS Bot 2013-10-15 16:28:18 PDT
Comment on attachment 214313 [details]
patch

Attachment 214313 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/3384087
Comment 5 Anders Carlsson 2013-10-15 16:57:56 PDT
Comment on attachment 214313 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=214313&action=review

> Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm:85
> +        const RemoteLayerTreeTransaction::LayerProperties& properties = changedLayer.value;

Can use const auto& here.

> Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm:116
> +            NSMutableArray *children = [[NSMutableArray alloc] init];

I believe you’re leaking this array here. Also, I think you can initWithCapacity.

> Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm:132
> +        layer.get().style = @{ @"actions" : nullActionsDictionary() };

I think you should use [layer setStyle:] here.

> Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:61
> +

Extra newline here.

> Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:140
> +

Extra newline.
Comment 6 Tim Horton 2013-10-15 17:19:37 PDT
http://trac.webkit.org/changeset/157478