⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 169097 in webkit


Ignore:
Timestamp:
May 19, 2014, 7:31:19 PM (12 years ago)
Author:
Simon Fraser
Message:

Scrolling pages with large TiledBacking content layers creates way too many tiles
​https://bugs.webkit.org/show_bug.cgi?id=133101

Reviewed by Tim Horton.

Fix the GraphicsLayerCA::adjustTiledLayerVisibleRect() logic to avoid making giant rects if the old
and new visible rects don't overlap.

  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):

  • platform/graphics/ca/mac/TileController.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r169096 r169097  
     12014-05-19  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Scrolling pages with large TiledBacking content layers creates way too many tiles
     4        https://bugs.webkit.org/show_bug.cgi?id=133101
     5
     6        Reviewed by Tim Horton.
     7
     8        Fix the GraphicsLayerCA::adjustTiledLayerVisibleRect() logic to avoid making giant rects if the old
     9        and new visible rects don't overlap.
     10
     11        * platform/graphics/TiledBacking.h:
     12        * platform/graphics/ca/GraphicsLayerCA.cpp:
     13        (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):
     14        * platform/graphics/ca/mac/TileController.h:
     15
    1162014-05-19  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/TiledBacking.h

    r168890 r169097  
    9797    // Includes margins.
    9898    virtual IntRect bounds() const = 0;
     99    virtual IntRect boundsWithoutMargin() const = 0;
    99100
    100101    // Exposed for testing
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r168559 r169097  
    18591859    // If the old visible rect is empty, we have no information about how the visible area is changing
    18601860    // (maybe the layer was just created), so don't attempt to expand. Also don't attempt to expand
    1861     // if the size changed.
    1862     if (oldVisibleRect.isEmpty() || newSize != oldSize)
     1861    // if the size changed or the rects don't overlap.
     1862    if (oldVisibleRect.isEmpty() || newSize != oldSize || !newVisibleRect.intersects(oldVisibleRect))
    18631863        return newVisibleRect;
    18641864
    … …  
    19121912    }
    19131913   
     1914    expandedRect.intersect(tiledBacking->boundsWithoutMargin());
    19141915    return expandedRect;
    19151916}
  • trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h

    r168890 r169097  
    9797    virtual IntSize tileSize() const override { return m_tileSize; }
    9898    virtual IntRect bounds() const override;
     99    virtual IntRect boundsWithoutMargin() const override;
    99100    virtual bool hasMargins() const override;
    100101    virtual bool hasHorizontalMargins() const override;
    … …  
    107108    virtual bool unparentsOffscreenTiles() const override { return m_unparentsOffscreenTiles; }
    108109    virtual bool scrollingPerformanceLoggingEnabled() const override { return m_scrollingPerformanceLoggingEnabled; }
    109 
    110     IntRect boundsWithoutMargin() const;
    111110
    112111    FloatRect computeTileCoverageRect(const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect) const;
Note: See TracChangeset for help on using the changeset viewer.