Changeset 157279 in webkit


Ignore:
Timestamp:
Oct 10, 2013, 5:30:29 PM (12 years ago)
Author:
Simon Fraser
Message:

Always force layout before flushing compositing layers
https://bugs.webkit.org/show_bug.cgi?id=122626

Reviewed by Tim Horton.

[m_webView _flushCompositingChanges] only actually flushes compositing
layers if the FrameView does not need layout (FrameView::flushCompositingStateForThisFrame()
returns in this case). In this situation, flushLayers() does actually try
to force a layout, but on some platforms it's possible for something else
to dirty layout before the runloop observer fires again. This can result
in flushLayers() never actually managing to flush, which stalls visual
updates.

Fix by always calling -viewWillDraw (which updates layout) before flushing
layers. This now matches WebKit2 behavior.

  • WebView/WebView.mm:

(LayerFlushController::flushLayers):

Location:
trunk/Source/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r157265 r157279  
     12013-10-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Always force layout before flushing compositing layers
     4        https://bugs.webkit.org/show_bug.cgi?id=122626
     5
     6        Reviewed by Tim Horton.
     7       
     8        [m_webView _flushCompositingChanges] only actually flushes compositing
     9        layers if the FrameView does not need layout (FrameView::flushCompositingStateForThisFrame()
     10        returns in this case). In this situation, flushLayers() does actually try
     11        to force a layout, but on some platforms it's possible for something else
     12        to dirty layout before the runloop observer fires again. This can result
     13        in flushLayers() never actually managing to flush, which stalls visual
     14        updates.
     15       
     16        Fix by always calling -viewWillDraw (which updates layout) before flushing
     17        layers. This now matches WebKit2 behavior.
     18
     19        * WebView/WebView.mm:
     20        (LayerFlushController::flushLayers):
     21
    1222013-10-10  Andy Estes  <aestes@apple.com>
    223
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r157265 r157279  
    65116511        return false;
    65126512
     6513    [m_webView _viewWillDrawInternal];
     6514
    65136515    if ([m_webView _flushCompositingChanges]) {
    65146516        // AppKit may have disabled screen updates, thinking an upcoming window flush will re-enable them.
     
    65206522        return true;
    65216523    }
    6522 
    6523     // Since the WebView does not need display, -viewWillDraw will not be called. Perform pending layout now,
    6524     // so that the layers draw with up-to-date layout.
    6525     [m_webView _viewWillDrawInternal];
    65266524
    65276525    return false;
Note: See TracChangeset for help on using the changeset viewer.