Changeset 160052 in webkit


Ignore:
Timestamp:
Dec 3, 2013, 3:28:10 PM (12 years ago)
Author:
timothy_horton@apple.com
Message:

Remote Layer Tree: Force repaint
https://bugs.webkit.org/show_bug.cgi?id=125189
<rdar://problem/15541789>

Reviewed by Anders Carlsson.

  • WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::forceRepaint):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
Implement WebProcess-synchronous force repaint.
We don't need the async variant because it is only needed
to synchronize with the WebProcess-side threaded scrolling
tree, which is not a component of the remote layer tree model.
The UI process will not handle the callback until after
RemoteLayerTreeHost::commit is complete, ensuring that the commit
is actually done.

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r160050 r160052  
     12013-12-03  Tim Horton  <timothy_horton@apple.com>
     2
     3        Remote Layer Tree: Force repaint
     4        https://bugs.webkit.org/show_bug.cgi?id=125189
     5        <rdar://problem/15541789>
     6
     7        Reviewed by Anders Carlsson.
     8
     9        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
     10        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
     11        (WebKit::RemoteLayerTreeContext::forceRepaint):
     12        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
     13        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
     14        (WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
     15        Implement WebProcess-synchronous force repaint.
     16        We don't need the async variant because it is only needed
     17        to synchronize with the WebProcess-side threaded scrolling
     18        tree, which is not a component of the remote layer tree model.
     19        The UI process will not handle the callback until after
     20        RemoteLayerTreeHost::commit is complete, ensuring that the commit
     21        is actually done.
     22
    1232013-12-03  Simon Fraser  <simon.fraser@apple.com>
    224
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h

    r159956 r160052  
    5959    void setIsFlushingSuspended(bool);
    6060
     61    void forceRepaint();
     62
    6163private:
    6264    // WebCore::GraphicsLayerFactory
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm

    r159956 r160052  
    2727#import "RemoteLayerTreeContext.h"
    2828
     29#import "GenericCallback.h"
    2930#import "GraphicsLayerCARemote.h"
    3031#import "PlatformCALayerRemote.h"
     
    152153}
    153154
     155void RemoteLayerTreeContext::forceRepaint()
     156{
     157    if (m_isFlushingSuspended)
     158        return;
     159
     160    for (Frame* frame = &m_webPage->corePage()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
     161        FrameView* frameView = frame->view();
     162        if (!frameView || !frameView->tiledBacking())
     163            continue;
     164
     165        frameView->tiledBacking()->forceRepaint();
     166    }
     167
     168    flushLayers();
     169}
     170
    154171} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h

    r160050 r160052  
    6767    virtual void setLayerTreeStateIsFrozen(bool) OVERRIDE;
    6868
     69    virtual void forceRepaint() OVERRIDE;
     70    virtual bool forceRepaintAsync(uint64_t) OVERRIDE { return false; }
     71
    6972    // WebCore::GraphicsLayerClient
    7073    virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE { }
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm

    r160050 r160052  
    203203}
    204204
     205void RemoteLayerTreeDrawingArea::forceRepaint()
     206{
     207    m_remoteLayerTreeContext->forceRepaint();
     208}
     209
    205210} // namespace WebKit
Note: See TracChangeset for help on using the changeset viewer.