Bug 130984 - Synchronize Web process remote layer tree commits with CoreAnimation commits in the UI process
Summary: Synchronize Web process remote layer tree commits with CoreAnimation commits ...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
Depends on:
Reported: 2014-03-31 13:00 PDT by Tim Horton
Modified: 2014-03-31 15:53 PDT (History)
3 users (show)

See Also:

patch (11.90 KB, patch)
2014-03-31 13:00 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-03-31 13:00:02 PDT
Created attachment 228193 [details]

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]

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;

Comment 3 Tim Horton 2014-03-31 15:53:24 PDT