Changeset 197594 in webkit


Ignore:
Timestamp:
Mar 4, 2016 3:32:22 PM (8 years ago)
Author:
Simon Fraser
Message:

Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=154985

Reviewed by Zalan Bujtas.

Source/WebCore:

r197541 inadvertently missed FrameView changes that push scrollability data
onto the TiledBacking, so didn't actually change behavior (hence the 512x512 tiles
in the failing tests).

Also remove m_tileSizeAtLastRevalidate from TileGrid; it's replaced by a simpler test.

  • page/FrameView.cpp:

(WebCore::FrameView::addedOrRemovedScrollbar):

  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::TileGrid): Deleted.

  • platform/graphics/ca/TileGrid.h:

LayoutTests:

  • tiled-drawing/background-transparency-toggle-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
  • tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/tile-coverage-after-scroll-expected.txt:
  • tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
  • tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
  • tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
  • tiled-drawing/tile-coverage-speculative-expected.txt:
  • tiled-drawing/tile-size-unscrollable-expected.txt:
  • tiled-drawing/tile-size-vertically-scrollable-expected.txt:
  • tiled-drawing/visible-rect-content-inset-expected.txt:
Location:
trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r197585 r197594  
     12016-03-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Use larger tiles when possible to reduce per-tile painting overhead
     4        https://bugs.webkit.org/show_bug.cgi?id=154985
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        * tiled-drawing/background-transparency-toggle-expected.txt:
     9        * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
     10        * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
     11        * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
     12        * tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
     13        * tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
     14        * tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
     15        * tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
     16        * tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
     17        * tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
     18        * tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
     19        * tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
     20        * tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
     21        * tiled-drawing/tile-coverage-after-scroll-expected.txt:
     22        * tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
     23        * tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
     24        * tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
     25        * tiled-drawing/tile-coverage-speculative-expected.txt:
     26        * tiled-drawing/tile-size-unscrollable-expected.txt:
     27        * tiled-drawing/tile-size-vertically-scrollable-expected.txt:
     28        * tiled-drawing/visible-rect-content-inset-expected.txt:
     29
    1302016-03-04  Ryan Haddad  <ryanhaddad@apple.com>
    231
  • trunk/LayoutTests/tiled-drawing/background-transparency-toggle-expected.txt

    r197571 r197594  
    99      (contentsOpaque 1)
    1010      (tile cache coverage 0, 0 800 x 600)
    11       (tile size 512 x 512)
    12       (top left tile 0, 0 tiles grid 2 x 2)
     11      (tile size 800 x 600)
     12      (top left tile 0, 0 tiles grid 1 x 1)
    1313    )
    1414  )
     
    2222      (backgroundColor #00000033)
    2323      (tile cache coverage 0, 0 800 x 600)
    24       (tile size 512 x 512)
    25       (top left tile 0, 0 tiles grid 2 x 2)
     24      (tile size 800 x 600)
     25      (top left tile 0, 0 tiles grid 1 x 1)
    2626    )
    2727  )
     
    3535      (contentsOpaque 1)
    3636      (tile cache coverage 0, 0 800 x 600)
    37       (tile size 512 x 512)
    38       (top left tile 0, 0 tiles grid 2 x 2)
     37      (tile size 800 x 600)
     38      (top left tile 0, 0 tiles grid 1 x 1)
    3939    )
    4040  )
     
    4747      (bounds 785.00 648.00)
    4848      (contentsOpaque 1)
    49       (tile cache coverage 0, 0 785 x 648)
    50       (tile size 512 x 512)
    51       (top left tile 0, 0 tiles grid 2 x 2)
     49      (tile cache coverage 0, 0 785 x 600)
     50      (tile size 800 x 600)
     51      (top left tile 0, 0 tiles grid 1 x 1)
    5252    )
    5353  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt

    r197571 r197594  
    2626      (contentsScale 1.00)
    2727      (tile cache coverage 0, 0 785 x 2048)
    28       (tile size 512 x 512)
    29       (top left tile 0, 0 tiles grid 2 x 4)
     28      (tile size 785 x 512)
     29      (top left tile 0, 0 tiles grid 1 x 4)
    3030    )
    3131  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt

    r197571 r197594  
    2626      (contentsScale 1.00)
    2727      (tile cache coverage 0, 0 785 x 2048)
    28       (tile size 512 x 512)
    29       (top left tile 0, 0 tiles grid 2 x 4)
     28      (tile size 785 x 512)
     29      (top left tile 0, 0 tiles grid 1 x 4)
    3030    )
    3131  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt

    r197571 r197594  
    2626      (contentsScale 1.00)
    2727      (tile cache coverage 0, 0 785 x 2048)
    28       (tile size 512 x 512)
    29       (top left tile 0, 0 tiles grid 2 x 4)
     28      (tile size 785 x 512)
     29      (top left tile 0, 0 tiles grid 1 x 4)
    3030    )
    3131  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt

    r197571 r197594  
    2626      (contentsScale 1.00)
    2727      (tile cache coverage 0, 0 785 x 2048)
    28       (tile size 512 x 512)
    29       (top left tile 0, 0 tiles grid 2 x 4)
     28      (tile size 785 x 512)
     29      (top left tile 0, 0 tiles grid 1 x 4)
    3030    )
    3131  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt

    r197571 r197594  
    77      (contentsOpaque 1)
    88      (tile cache coverage 0, 0 785 x 1024)
    9       (tile size 512 x 512)
    10       (top left tile 0, 0 tiles grid 2 x 2)
     9      (tile size 785 x 512)
     10      (top left tile 0, 0 tiles grid 1 x 2)
    1111    )
    1212  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt

    r197571 r197594  
    1717          (bounds 785.00 1600.00)
    1818          (tile cache coverage 0, 0 785 x 1024)
    19           (tile size 512 x 512)
    20           (top left tile 0, 0 tiles grid 2 x 2)
     19          (tile size 785 x 512)
     20          (top left tile 0, 0 tiles grid 1 x 2)
    2121        )
    2222      )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt

    r197571 r197594  
    1717          (bounds 785.00 1700.00)
    1818          (tile cache coverage 0, 0 785 x 1024)
    19           (tile size 512 x 512)
    20           (top left tile 0, 0 tiles grid 2 x 2)
     19          (tile size 785 x 512)
     20          (top left tile 0, 0 tiles grid 1 x 2)
    2121        )
    2222      )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt

    r197571 r197594  
    1717          (bounds 785.00 1700.00)
    1818          (tile cache coverage 0, 0 785 x 1024)
    19           (tile size 512 x 512)
    20           (top left tile 0, 0 tiles grid 2 x 2)
     19          (tile size 785 x 512)
     20          (top left tile 0, 0 tiles grid 1 x 2)
    2121        )
    2222      )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt

    r197571 r197594  
    1717          (bounds 785.00 3700.00)
    1818          (tile cache coverage 0, 0 785 x 1024)
    19           (tile size 512 x 512)
    20           (top left tile 0, 0 tiles grid 2 x 2)
     19          (tile size 785 x 512)
     20          (top left tile 0, 0 tiles grid 1 x 2)
    2121        )
    2222      )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt

    r197571 r197594  
    1717          (bounds 785.00 1516.00)
    1818          (tile cache coverage 0, 0 785 x 1024)
    19           (tile size 512 x 512)
    20           (top left tile 0, 0 tiles grid 2 x 2)
     19          (tile size 785 x 512)
     20          (top left tile 0, 0 tiles grid 1 x 2)
    2121        )
    2222      )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt

    r197571 r197594  
    88      (backgroundColor #C0C0C0)
    99      (tile cache coverage 0, 0 785 x 1024)
    10       (tile size 512 x 512)
    11       (top left tile 0, 0 tiles grid 2 x 2)
     10      (tile size 785 x 512)
     11      (top left tile 0, 0 tiles grid 1 x 2)
    1212    )
    1313  )
  • trunk/LayoutTests/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt

    r197571 r197594  
    4444      (intersects coverage rect 1)
    4545      (contentsScale 2.30)
    46       (tile cache coverage 0, 0 445 x 445)
    47       (tile size 512 x 512)
    48       (top left tile 0, 0 tiles grid 2 x 2)
     46      (tile cache coverage 0, 0 341 x 445)
     47      (tile size 785 x 512)
     48      (top left tile 0, 0 tiles grid 1 x 2)
    4949      (children 4
    5050        (GraphicsLayer
  • trunk/LayoutTests/tiled-drawing/tile-coverage-after-scroll-expected.txt

    r197571 r197594  
    1515      (contentsScale 1.00)
    1616      (tile cache coverage 0, 2560 785 x 1536)
    17       (tile size 512 x 512)
    18       (top left tile 0, 5 tiles grid 2 x 3)
     17      (tile size 785 x 512)
     18      (top left tile 0, 5 tiles grid 1 x 3)
    1919    )
    2020  )
  • trunk/LayoutTests/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt

    r197571 r197594  
    1515      (contentsScale 1.00)
    1616      (tile cache coverage 0, 2560 785 x 1536)
    17       (tile size 512 x 512)
    18       (top left tile 0, 5 tiles grid 2 x 3)
     17      (tile size 785 x 512)
     18      (top left tile 0, 5 tiles grid 1 x 3)
    1919    )
    2020  )
  • trunk/LayoutTests/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt

    r197571 r197594  
    1515      (contentsScale 1.00)
    1616      (tile cache coverage 0, 4096 785 x 925)
    17       (tile size 512 x 512)
    18       (top left tile 0, 8 tiles grid 2 x 2)
     17      (tile size 785 x 512)
     18      (top left tile 0, 8 tiles grid 1 x 2)
    1919    )
    2020  )
  • trunk/LayoutTests/tiled-drawing/tile-coverage-slow-scrolling-expected.txt

    r197571 r197594  
    1515      (contentsScale 1.00)
    1616      (tile cache coverage 0, 0 800 x 600)
    17       (tile size 512 x 512)
    18       (top left tile 0, 0 tiles grid 2 x 2)
     17      (tile size 800 x 600)
     18      (top left tile 0, 0 tiles grid 1 x 1)
    1919    )
    2020  )
  • trunk/LayoutTests/tiled-drawing/tile-coverage-speculative-expected.txt

    r197571 r197594  
    1515      (contentsScale 1.00)
    1616      (tile cache coverage 0, 0 785 x 1024)
    17       (tile size 512 x 512)
    18       (top left tile 0, 0 tiles grid 2 x 2)
     17      (tile size 785 x 512)
     18      (top left tile 0, 0 tiles grid 1 x 2)
    1919    )
    2020  )
  • trunk/LayoutTests/tiled-drawing/tile-size-unscrollable-expected.txt

    r197571 r197594  
    77      (contentsOpaque 1)
    88      (tile cache coverage 0, 0 800 x 600)
    9       (tile size 512 x 512)
    10       (top left tile 0, 0 tiles grid 2 x 2)
     9      (tile size 800 x 600)
     10      (top left tile 0, 0 tiles grid 1 x 1)
    1111    )
    1212  )
  • trunk/LayoutTests/tiled-drawing/tile-size-vertically-scrollable-expected.txt

    r197571 r197594  
    77      (contentsOpaque 1)
    88      (tile cache coverage 0, 0 785 x 1024)
    9       (tile size 512 x 512)
    10       (top left tile 0, 0 tiles grid 2 x 2)
     9      (tile size 785 x 512)
     10      (top left tile 0, 0 tiles grid 1 x 2)
    1111    )
    1212  )
  • trunk/LayoutTests/tiled-drawing/visible-rect-content-inset-expected.txt

    r197571 r197594  
    1616      (contentsScale 1.00)
    1717      (tile cache coverage 0, 0 800 x 500)
    18       (tile size 512 x 512)
    19       (top left tile 0, 0 tiles grid 2 x 1)
     18      (tile size 800 x 512)
     19      (top left tile 0, 0 tiles grid 1 x 1)
    2020    )
    2121  )
  • trunk/Source/WebCore/ChangeLog

    r197593 r197594  
     12016-03-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Use larger tiles when possible to reduce per-tile painting overhead
     4        https://bugs.webkit.org/show_bug.cgi?id=154985
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        r197541 inadvertently missed FrameView changes that push scrollability data
     9        onto the TiledBacking, so didn't actually change behavior (hence the 512x512 tiles
     10        in the failing tests).
     11
     12        Also remove m_tileSizeAtLastRevalidate from TileGrid; it's replaced by a simpler test.
     13
     14        * page/FrameView.cpp:
     15        (WebCore::FrameView::addedOrRemovedScrollbar):
     16        * platform/graphics/ca/TileGrid.cpp:
     17        (WebCore::TileGrid::revalidateTiles):
     18        (WebCore::TileGrid::TileGrid): Deleted.
     19        * platform/graphics/ca/TileGrid.h:
     20
    1212016-03-04  Simon Fraser  <simon.fraser@apple.com>
    222
  • trunk/Source/WebCore/page/FrameView.cpp

    r197016 r197594  
    24662466            renderView->compositor().frameViewDidAddOrRemoveScrollbars();
    24672467    }
     2468
     2469    if (auto* tiledBacking = this->tiledBacking()) {
     2470        TiledBacking::Scrollability scrollability = TiledBacking::NotScrollable;
     2471        if (horizontalScrollbar())
     2472            scrollability = TiledBacking::HorizontallyScrollable;
     2473
     2474        if (verticalScrollbar())
     2475            scrollability |= TiledBacking::VerticallyScrollable;
     2476
     2477        tiledBacking->setScrollability(scrollability);
     2478    }
    24682479}
    24692480
  • trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp

    r197541 r197594  
    4747    , m_cohortRemovalTimer(*this, &TileGrid::cohortRemovalTimerFired)
    4848    , m_tileSize(kDefaultTileSize, kDefaultTileSize)
    49     , m_tileSizeAtLastRevalidate(m_tileSize)
    5049{
    5150    m_containerLayer.get().setName(TileController::tileGridContainerLayerName());
     
    334333    bool needsTileRevalidation = false;
    335334   
    336     m_tileSize = m_controller.tileSize();
    337     if (m_tileSize != m_tileSizeAtLastRevalidate) {
     335    auto tileSize = m_controller.tileSize();
     336    if (tileSize != m_tileSize) {
    338337        removeAllTiles();
    339         m_tileSizeAtLastRevalidate = m_tileSize;
     338        m_tileSize = tileSize;
    340339    }
    341340
  • trunk/Source/WebCore/platform/graphics/ca/TileGrid.h

    r197563 r197594  
    168168   
    169169    IntSize m_tileSize;
    170     IntSize m_tileSizeAtLastRevalidate;
    171170
    172171    float m_scale { 1 };
Note: See TracChangeset for help on using the changeset viewer.