Changeset 83653 in webkit


Ignore:
Timestamp:
Apr 12, 2011 3:43:19 PM (13 years ago)
Author:
cmarrin@apple.com
Message:

2011-04-12 Chris Marrin <cmarrin@apple.com>

Reviewed by Simon Fraser.

Page tears and stutters in WebKit2 when page is > 2048 pixels wide
https://bugs.webkit.org/show_bug.cgi?id=58330

Added API to GraphicsLayer to disable switching to tiled layers. This is
set in the nonCompositedContentLayer in WK2, causing that layer to never
switch to tiles and avoiding the asynchronous update of the content during
scroll.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

Implement setAllowTiledLayer() to simulate a SizeChanged action to
properly switch between tiled and untiled layer.

  • platform/graphics/ca/GraphicsLayerCA.h:

2011-04-12 Chris Marrin <cmarrin@apple.com>

Reviewed by Simon Fraser.

Page tears and stutters in WebKit2 when page is > 2048 pixels wide
https://bugs.webkit.org/show_bug.cgi?id=58330

Turn off tiling for nonCompositedContentLayer to avoid tearing when
scrolling very wide (> 2048) windows.

  • WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize):
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83649 r83653  
     12011-04-12  Chris Marrin  <cmarrin@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Page tears and stutters in WebKit2 when page is > 2048 pixels wide
     6        https://bugs.webkit.org/show_bug.cgi?id=58330
     7
     8        Added API to GraphicsLayer to disable switching to tiled layers. This is
     9        set in the nonCompositedContentLayer in WK2, causing that layer to never
     10        switch to tiles and avoiding the asynchronous update of the content during
     11        scroll.
     12
     13        * platform/graphics/ca/GraphicsLayerCA.cpp:
     14            Implement setAllowTiledLayer() to simulate a SizeChanged action to
     15            properly switch between tiled and untiled layer.
     16        * platform/graphics/ca/GraphicsLayerCA.h:
     17
    1182011-04-12  Alok Priyadarshi  <alokp@chromium.org>
    219
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r81715 r83653  
    256256    , m_uncommittedChanges(NoChange)
    257257    , m_contentsScale(1)
     258    , m_allowTiledLayer(true)
    258259{
    259260    m_layer = PlatformCALayer::create(PlatformCALayer::LayerTypeWebLayer, this);
     
    491492    GraphicsLayer::setAcceleratesDrawing(acceleratesDrawing);
    492493    noteLayerPropertyChanged(AcceleratesDrawingChanged);
     494}
     495
     496void GraphicsLayerCA::setAllowTiledLayer(bool allowTiledLayer)
     497{
     498    if (allowTiledLayer == m_allowTiledLayer)
     499        return;
     500
     501    m_allowTiledLayer = allowTiledLayer;
     502   
     503    // Handling this as a SizeChanged will cause use to switch in or out of tiled layer as needed
     504    noteLayerPropertyChanged(SizeChanged);
    493505}
    494506
     
    20062018bool GraphicsLayerCA::requiresTiledLayer(const FloatSize& size) const
    20072019{
    2008     if (!m_drawsContent)
     2020    if (!m_drawsContent || !m_allowTiledLayer)
    20092021        return false;
    20102022
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r75639 r83653  
    122122    virtual void syncCompositingState();
    123123    virtual void syncCompositingStateForThisLayerOnly();
     124
     125    bool allowTiledLayer() const { return m_allowTiledLayer; }
     126    virtual void setAllowTiledLayer(bool b);
    124127
    125128protected:
     
    400403    float clampedContentsScaleForScale(float) const;
    401404    float m_contentsScale;
     405   
     406    bool m_allowTiledLayer;
    402407};
    403408
  • trunk/Source/WebKit2/ChangeLog

    r83647 r83653  
     12011-04-12  Chris Marrin  <cmarrin@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Page tears and stutters in WebKit2 when page is > 2048 pixels wide
     6        https://bugs.webkit.org/show_bug.cgi?id=58330
     7
     8        Turn off tiling for nonCompositedContentLayer to avoid tearing when
     9        scrolling very wide (> 2048) windows.
     10
     11        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
     12        (WebKit::LayerTreeHostCA::initialize):
     13
    1142011-04-12  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp

    r82854 r83653  
    6060
    6161    m_nonCompositedContentLayer = GraphicsLayer::create(this);
     62    static_cast<GraphicsLayerCA*>(m_nonCompositedContentLayer.get())->setAllowTiledLayer(false);
    6263#ifndef NDEBUG
    6364    m_nonCompositedContentLayer->setName("LayerTreeHost non-composited content");
Note: See TracChangeset for help on using the changeset viewer.