Changeset 131373 in webkit


Ignore:
Timestamp:
Oct 15, 2012, 3:31:08 PM (13 years ago)
Author:
Simon Fraser
Message:

Ensure that GraphicsLayer positions are updated while doing threaded scrolling
https://bugs.webkit.org/show_bug.cgi?id=99372

Reviewed by Anders Carlsson.

When doing threaded scrolling, the scrolling thread updates the positions of CALayers,
but doesn't update GraphicsLayers. This means that code that relies on GraphicsLayer positions
works incorrectly.

Threaded scrolling is not testabled in layout tests.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):

  • platform/graphics/GraphicsLayer.h:

(GraphicsLayer):
(WebCore::GraphicsLayer::syncPosition):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r131372 r131373  
     12012-10-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Ensure that GraphicsLayer positions are updated while doing threaded scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=99372
     5
     6        Reviewed by Anders Carlsson.
     7
     8        When doing threaded scrolling, the scrolling thread updates the positions of CALayers,
     9        but doesn't update GraphicsLayers. This means that code that relies on GraphicsLayer positions
     10        works incorrectly.
     11       
     12        Threaded scrolling is not testabled in layout tests.
     13
     14        * page/scrolling/ScrollingCoordinator.cpp:
     15        (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
     16        * platform/graphics/GraphicsLayer.h:
     17        (GraphicsLayer):
     18        (WebCore::GraphicsLayer::syncPosition):
     19
    1202012-10-15  Tommy Widenflycht  <tommyw@google.com>
    221
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r131137 r131373  
    236236
    237237    frameView->setInProgrammaticScroll(oldProgrammaticScroll);
     238
     239    if (GraphicsLayer* scrollLayer = scrollLayerForFrameView(frameView))
     240        scrollLayer->syncPosition(-frameView->scrollPosition());
    238241}
    239242
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r130927 r131373  
    247247    const FloatPoint& position() const { return m_position; }
    248248    virtual void setPosition(const FloatPoint& p) { m_position = p; }
     249
     250    // For platforms that move underlying platform layers on a different thread for scrolling; just update the GraphicsLayer state.
     251    virtual void syncPosition(const FloatPoint& p) { m_position = p; }
    249252   
    250253    // Anchor point: (0, 0) is top left, (1, 1) is bottom right. The anchor point
Note: See TracChangeset for help on using the changeset viewer.