Changeset 201929 in webkit


Ignore:
Timestamp:
Jun 10, 2016 11:01:54 AM (8 years ago)
Author:
Simon Fraser
Message:

[iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=158622
rdar://problem/26609452

Reviewed by Tim Horton.

It's possible for a CADisplayLink to fire after being paused sometimes, possibly
when an app is running another CADisplayLink whose callback takes some time. When
this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
to proceed when the m_pendingBackingStoreFlusher was still flushing.

Fix by preventing two didUpdates from being sent from the UI process between
commits.

Not easily testable.

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r201923 r201929  
     12016-06-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [iOS WK2] Rare RELEASE_ASSERT under RemoteLayerTreeDrawingArea::flushLayers()
     4        https://bugs.webkit.org/show_bug.cgi?id=158622
     5        rdar://problem/26609452
     6
     7        Reviewed by Tim Horton.
     8       
     9        It's possible for a CADisplayLink to fire after being paused sometimes, possibly
     10        when an app is running another CADisplayLink whose callback takes some time. When
     11        this happens, RemoteLayerTreeDrawingAreaProxy could erroneously send a second
     12        didUpdate() to the web process between commits, which would clear the m_waitingForBackingStoreSwap
     13        flag too early, and allow a subsequent RemoteLayerTreeDrawingArea::flushLayers()
     14        to proceed when the m_pendingBackingStoreFlusher was still flushing.
     15
     16        Fix by preventing two didUpdates from being sent from the UI process between
     17        commits.
     18       
     19        Not easily testable.
     20
     21        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
     22        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
     23        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
     24        (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
     25
    1262016-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
    227
  • trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h

    r199111 r201929  
    9292    RemoteLayerTreeHost m_remoteLayerTreeHost;
    9393    bool m_isWaitingForDidUpdateGeometry { false };
     94    bool m_haveSentDidUpdateSinceLastCommit { false };
    9495
    9596    WebCore::IntSize m_lastSentSize;
  • trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm

    r200470 r201929  
    220220    m_webPageProxy.layerTreeCommitComplete();
    221221
     222    m_haveSentDidUpdateSinceLastCommit = false;
     223
    222224#if PLATFORM(IOS)
    223225    [m_displayLinkHandler schedule];
     
    390392        return;
    391393
     394    if (m_haveSentDidUpdateSinceLastCommit)
     395        return;
     396   
     397    m_haveSentDidUpdateSinceLastCommit = true;
     398
    392399    // Waiting for CA to commit is insufficient, because the render server can still be
    393400    // using our backing store. We can improve this by waiting for the render server to commit
Note: See TracChangeset for help on using the changeset viewer.