Bug 130984

Summary: Synchronize Web process remote layer tree commits with CoreAnimation commits in the UI process
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch simon.fraser: review+

Description Tim Horton 2014-03-31 13:00:02 PDT
Created attachment 228193 [details]
patch

There's no reason for the Web process to paint faster than the UI process
can apply to and commit the CoreAnimation layer tree.

Also, once we get proper double-buffering and purgeable back buffers, we
will need the ability to make some assumptions about in-use surfaces.

Unfortunately, we can't actually tell when the render server commits, 
as this is an asynchronous operation in a process we don't control, so
for now, this is only an approximation.

This also means that the assumptions we would like to make won't be
strong guarantees yet.
Comment 1 WebKit Commit Bot 2014-03-31 13:02:24 PDT
Attachment 228193 [details] did not pass style-queue:


ERROR: Source/WebKit2/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 2 Simon Fraser (smfr) 2014-03-31 13:49:30 PDT
Comment on attachment 228193 [details]
patch

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

> Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:293
> +    m_layerCommitObserver = adoptCF(CFRunLoopObserverCreate(0, kCFRunLoopBeforeWaiting | kCFRunLoopExit, true, DidCommitLayersRunLoopOrder, coreAnimationDidCommitLayersCallback, &context));

Do we need to explicitly invalidate this guy in the destructor?

> Source/WebKit2/WebProcess/WebPage/DrawingArea.h:144
> +    virtual void didSwapBackingStore() { }

Not super keen on this name.

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:116
> +    bool m_hasFlushDeferredWhileWaitingForBackingStoreSwap;

hadFlushDeferredWhileWaitingForBackingStoreSwap?
Comment 3 Tim Horton 2014-03-31 15:53:24 PDT
http://trac.webkit.org/changeset/166540