Skip to content
  • jocelyn.turcotte@digia.com's avatar
    [Qt] Decide when to apply a scrolled position to the viewport based on the... · a1081ec3
    jocelyn.turcotte@digia.com authored
    [Qt] Decide when to apply a scrolled position to the viewport based on the rect covered by the tiles
    https://bugs.webkit.org/show_bug.cgi?id=97777
    
    Reviewed by Kenneth Rohde Christiansen.
    
    Source/WebCore:
    
    * platform/graphics/TiledBackingStore.cpp:
    (WebCore::TiledBackingStore::createTiles):
    * platform/graphics/TiledBackingStore.h:
    (WebCore::TiledBackingStore::coverRect):
    (WebCore::TiledBackingStore::setCoverRect):
    (TiledBackingStore):
    
    Source/WebKit2:
    
    This patch achieves two things:
    - Apply a short scroll position request directly if we already have rendered tiles
      at this position.
    - Since our visible rect request is asynchronous, the next frame might not always
      be the one covering this position. This will wait for a frame that does to apply it.
    
    * UIProcess/API/qt/raw/qrawwebview_p_p.h:
    (QRawWebViewPrivate::didRenderFrame):
    * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
    (WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
    * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
    (LayerTreeCoordinatorProxy):
    * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
    * UIProcess/PageClient.h:
    (PageClient):
    * UIProcess/PageViewportController.cpp:
    (WebKit::PageViewportController::didCommitLoad):
    (WebKit::PageViewportController::didRenderFrame):
    (WebKit::PageViewportController::pageDidRequestScroll):
    * UIProcess/PageViewportController.h:
    (PageViewportController):
    * UIProcess/WebPageProxy.h:
    (WebPageProxy):
    * UIProcess/qt/QtPageClient.cpp:
    (WebKit::QtPageClient::didRenderFrame):
    * UIProcess/qt/QtPageClient.h:
    (QtPageClient):
    * UIProcess/qt/WebPageProxyQt.cpp:
    (WebKit::WebPageProxy::didRenderFrame):
    * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
    (WebCore::CoordinatedGraphicsLayer::coverRect):
    * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
    (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a1081ec3